Skip to content

adam-qiang/go-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Reference MIT


go-tool

go语言工具,包含数据类型转换、UUID生成(后续视情况增加其他工具包)

一、data_convert_tool

数据转换工具包

1、MapToString

MAP数据转字符串

2、StringToMap

MAP数据转成字符串数据后再转回MAP

3、StringToIntMap

MAP数据转成字符串数据后再转回int类型KEY的MAP

4、ArrStringToString

数组(值为string)转字符串

5、StringToArrString

字符串转数组(值为string)

6、InterfaceMapToMap

interface类型map转为[string]interface{}类型

7、JsonToMap

JSON(byte)转MAP

8、InterfaceToStrVal

interface类型值转为字符串

9、StringToBytes

字符串转byte

10、DayToWeek

将时间转为星期

11、TimeRemark

目标时间距离当前时间时长

12、MonthToQuarter

将月份转为季度

二、uuid

UUID生成工具类

1、UuidNew

生成一个UUID

2、UuidToString

UUID转string

About

go语言工具

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages