- StringSlice2Int
This commit is contained in:
@@ -512,6 +512,16 @@ func StringSlice2Int64(intList []string) (outList []int64) {
|
||||
return outList
|
||||
}
|
||||
|
||||
func StringSlice2Int(intList []string) (outList []int) {
|
||||
if len(intList) > 0 {
|
||||
outList = make([]int, len(intList))
|
||||
for k, v := range intList {
|
||||
outList[k] = int(Str2Int64WithDefault(v, 0))
|
||||
}
|
||||
}
|
||||
return outList
|
||||
}
|
||||
|
||||
func IntSlice2Int64(intList []int) (outList []int64) {
|
||||
if len(intList) > 0 {
|
||||
outList = make([]int64, len(intList))
|
||||
|
||||
Reference in New Issue
Block a user