Go 动态类型声明 Go 静态类型声明 Go Mixed 变量声明 Go 动态类型声明 package main import "fmt" func main() { var x float64 = 20.0 y := 42 fmt.Println(x) fmt.Println(y) fmt.Printf("x is of type %T\n", x) fmt.Printf("y is of type %T\n", y) } Go 静态类型声明 Go Mixed 变量声明