Go Data Type int Convert to int16
package main//from w w w . j a va2s. c o m import ( "fmt" "reflect" ) func main() { var i int = 42 fmt.Println(reflect.TypeOf(i)) i16 := int16(i) fmt.Println(reflect.TypeOf(i16)) i32 := int32(i) fmt.Println(reflect.TypeOf(i32)) i64 := int64(i) fmt.Println(reflect.TypeOf(i64)) }