Just use the official strconv package:
#string to int int,err:=strconv.Atoi(string) #string to int64 int64, err := strconv.ParseInt(string, 10, 64) #int to string string:=strconv.Itoa(int) #int64 to string string:=strconv.FormatInt(int64,10)
Convert between the same type, such as int64 to int, directly int (int64);