This commit is contained in:
cdle
2023-06-10 12:33:14 +08:00
parent 10d5400f2f
commit a557523a11
11 changed files with 364 additions and 52 deletions
+17
View File
@@ -423,3 +423,20 @@ func flatten(arr [][]string) []interface{} {
}
return result
}
func Itoa(i interface{}) string {
switch i := i.(type) {
case int:
return strconv.Itoa(i)
case int32:
return strconv.Itoa(int(i))
case int64:
return strconv.Itoa(int(i))
case int16:
return strconv.Itoa(int(i))
case string:
return i
default:
return fmt.Sprint(i)
}
}