提交 b95892d9 authored 作者: mooncake9527's avatar mooncake9527

update

上级 c4783e62
...@@ -103,3 +103,11 @@ func ProtoInt64ToUint64(v int64) uint64 { ...@@ -103,3 +103,11 @@ func ProtoInt64ToUint64(v int64) uint64 {
func Uint64ToProtoInt64(v uint64) int64 { func Uint64ToProtoInt64(v uint64) int64 {
return int64(v) return int64(v)
} }
func StrToInt64(str string) int64 {
i, err := strconv.ParseInt(str, 10, 64) // 10表示十进制,64表示int64
if err != nil {
return 0
}
return i
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论