Golang中字符串和各种int类型之间的相互转换方式:

string转成int:

1
int, err := strconv.Atoi(string)

string转成int64:

1
int64, err := strconv.ParseInt(string, 10, 64)

int转成string:

1
string := strconv.Itoa(int)

int64转成string:

1
string := strconv.FormatInt(int64,10)