Im trying to convert an integer to an integer 64 in go, but they are out of luck. Does anyone know an easy way to do this?
This is called a type conversion :
i := 23 var i64 int64 i64 = int64(i)
This is probably obvious, but the simplest:
i64 := int64(23)
i := 23 i64 := int64(i) fmt.Printf("%T %T", i, i64) // to print the data types of i and i64