golang int与string互转
package main
import (
“fmt”
“strconv” //先导 strconv 包
)
func main () {
//string 转成 int,int64:在这里插入代码片
int, _ := strconv.Atoi(string )
int64, _ := strconv.ParseInt(string , 10, 64)
//int,int64 转成string:
string := strconv.Itoa(int)
string := strconv.FormatInt(int64,10)
}