折腾开发go 语言中类型转换string to int1 2 string转成int: int, err := strconv.Atoi(string) 1 2 string转成int64: int64, err := strconv.ParseInt(string, 10, 64) string to uint1 2 string转成uint64: int64, err := strconv.ParseUint(string, 10, 64) int to string1 2 int转成string: string := strconv.Itoa(int) 1 2 int64转成string: string := strconv.FormatInt(int64,10) uint to string1 2 int64转成string: string := strconv.FormatUint(int64,10)