[go] How to change int into int64?

Im trying to convert an integer into an integer64 in go but im having no luck. Anyone know an easy way to do this?

This question is related to go

The answer is


i := 23
i64 := int64(i)
fmt.Printf("%T %T", i, i64) // to print the data types of i and i64

This is probably obvious, but simplest:

i64 := int64(23)