# functions **Repository Path**: picasso250/functions ## Basic Information - **Project Name**: functions - **Description**: 一些go的常用工具函数(使用genny实现泛型) - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-02-01 - **Last Updated**: 2021-05-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # go-functions #### 介绍 一些go的常用工具函数 (主要针对切片、映射、字符串) 以下函数使用genny实现泛型 1. chunk/merge 2. map/filter 3. column 4. combine(zip) 5. countValues 6. flip 7. inSlice/search 8. fill 10. intersect/diff 12. keys/values 13. replace 14. reverse 15. splice 16. flat 16. suffle 16. sort 实现文件有两个:slice.go和map.go,分别是和切片和映射相关。 以下函数可以直接使用: 1. range 2. regSplit 3. chunkSplit #### 使用说明 1. cat slice.go | genny gen "Item=int,string Out=int" >your_repo/slice.go 1. cat map.go | genny gen "Key=string Val=int Out=int" >your_repo/map.go