//string到int
int,err:=strconv.Atoi(string)
//string到int64
int64, err := strconv.ParseInt(string, 10, 64)
//int到string
string:=strconv.Itoa(int)
//int64到string
string:=strconv.FormatInt(int64,10)
//字符串到float32/float64
float32, err = ParseFloat(string, 32)
float64,err = ParseFloat(string,64)
int和int64之间转换(类似于java的强制类型转换)
//int64转int
int:=int(int64)
//int转int64
int64:=int64(int)
有疑问加站长微信联系(非本文作者)