Go-常用函数备忘
· ☕ 1 分钟
重要 记录常用的一些函数 1. 字符串转int64 1 2 3 4 5 6 7 // Use the max value for signed 64 integer. http://golang.org/pkg/builtin/#int64 var s string = "9223372036854775807" i, err := strconv.ParseInt(s, 10, 64) if err != nil { panic(err) } fmt.Printf("Hello, %v with type %s!\n", i, reflect.TypeOf(i)) 输出: Hello, 9223372036854775807 with type