1
This commit is contained in:
@@ -15,8 +15,11 @@ import (
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"github.com/gazeboxu/mapstructure"
|
||||
"github.com/gazeboxu/structs"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
)
|
||||
|
||||
var json1 = jsoniter.ConfigCompatibleWithStandardLibrary
|
||||
|
||||
const MaxTimeSecond = 9573800254 // 正常最大的秒数
|
||||
|
||||
var (
|
||||
@@ -562,6 +565,18 @@ func Str2Int(s string) (i int) {
|
||||
return int(Str2Int64WithDefault(s, 0))
|
||||
}
|
||||
|
||||
//func String2Int64Slice(s string) []int64 {
|
||||
// res := make([]int64, 0)
|
||||
// if len(s) == 0 {
|
||||
// return res
|
||||
// }
|
||||
// if err := json1.DecoderOf(s, &res); err != nil {
|
||||
// log.Warnf("Error to deserialize string of []int64:%s, err=%v", s, err)
|
||||
// return res
|
||||
// }
|
||||
// return res
|
||||
//}
|
||||
|
||||
func Float64TwoInt(f float64) (i int) {
|
||||
return int(Float64TwoInt64(f))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user