# go-utils **Repository Path**: magein/go-utils ## Basic Information - **Project Name**: go-utils - **Description**: go语言常用的包 1. 时间 2. 文件 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-11-02 - **Last Updated**: 2022-11-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### go utils 安装 ``` go get gitee.com/magein/go-utils go get gitee.com/magein/go-utils@master go get gitee.com/magein/go-utils@0.0.1 ``` ``` # 获取日期 fmt.Println(times.Date("/")) fmt.Println(times.Unix()) fmt.Println("is int", tools.IsInt(1)) fmt.Println("index of", tools.IndexOf([]int{1, 2}, 2)) fmt.Println("in array ", tools.InArray("1,2,3,png", "png")) fmt.Println("file extension", oss.FileExtension("a.jp.png")) fmt.Println("file extension tolower", oss.FileExtension("a.jp.PNG")) fmt.Println("汉字长度", len("1a小马哥")) fmt.Println("汉字长度", mb.Len("1a小马哥")) fmt.Println("汉字截取", mb.Sub("1a小马哥", 2, 2)) ``` ### changelog 2022-11-03 1. 修改 SearchFile 中返回的 FileInfo结构体中缺少extension的bug