Golang mengonversi string ke int64
s := "97"
n, err := strconv.ParseInt(s, 10, 64)
if err == nil {
fmt.Printf("%d of type %T", n, n)
}
Julianto Tjan
s := "97"
n, err := strconv.ParseInt(s, 10, 64)
if err == nil {
fmt.Printf("%d of type %T", n, n)
}
i := int64(-123456789)
fmt.Println(i)
b := make([]byte, 8)
binary.LittleEndian.PutUint64(b, uint64(i))
fmt.Println(b)
i = int64(binary.LittleEndian.Uint64(b))
fmt.Println(i)