/* ** description(""). ** copyright('tuoyun,www.tuoyun.net'). ** author("fg,Gordon@tuoyun.net"). ** time(2021/4/8 15:09). */ package utils import "strconv" func IntToString(i int) string { return strconv.FormatInt(int64(i), 10) } func StringToInt(i string) int { j, _ := strconv.Atoi(i) return j } func StringToInt64(i string) int64 { j, _ := strconv.ParseInt(i, 10, 64) return j } //judge a string whether in the string list func IsContain(target string, List []string) bool { for _, element := range List { if target == element { return true } } return false } func InterfaceArrayToStringArray(data []interface{}) (i []string) { for _, param := range data { i = append(i, param.(string)) } return i }