conv包提供了各个类型之间的转换:
conv.MustInt("123", 0) // 返回123的数值 conv.MustString(123, "")// 返回字符串123 conv.Int("123", 0) // 返回123数值和nil的error接口
go get github.com/issue9/conv
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Latest commit | ||||
conv包提供了各个类型之间的转换:
conv.MustInt("123", 0) // 返回123的数值 conv.MustString(123, "")// 返回字符串123 conv.Int("123", 0) // 返回123数值和nil的error接口
go get github.com/issue9/conv
各种类型转换接口