Parsing string into int64 example:
// 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))
output:
Hello, 9223372036854775807 with type int64!
https://play.golang.org/p/XOKkE6WWer