1
This commit is contained in:
@@ -210,3 +210,7 @@ func TestCreateStoreCommodity(t *testing.T) {
|
|||||||
fmt.Println("err=============", err)
|
fmt.Println("err=============", err)
|
||||||
fmt.Println("data===", fmt.Sprintf("%v", data))
|
fmt.Println("data===", fmt.Sprintf("%v", data))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestInt16(t *testing.T) {
|
||||||
|
fmt.Println(utils.Str2Int16(strings.ReplaceAll("08:00", ":", "")))
|
||||||
|
}
|
||||||
|
|||||||
@@ -565,6 +565,10 @@ func Str2Int(s string) (i int) {
|
|||||||
return int(Str2Int64WithDefault(s, 0))
|
return int(Str2Int64WithDefault(s, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Str2Int16(s string) (i int16) {
|
||||||
|
return int16(Str2Int64WithDefault(s, 0))
|
||||||
|
}
|
||||||
|
|
||||||
//func String2Int64Slice(s string) []int64 {
|
//func String2Int64Slice(s string) []int64 {
|
||||||
// res := make([]int64, 0)
|
// res := make([]int64, 0)
|
||||||
// if len(s) == 0 {
|
// if len(s) == 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user