为什么这不起作用?它适用于 := 运算符,但为什么我们不能在这里使用 = 运算符?
package main
import "fmt"
type Vertex struct {
X, Y int
}
func main() {
v1 = Vertex{1, 2} // has type Vertex
v2 = Vertex{X: 1} // Y:0 is implicit
v3 = Vertex{} // X:0 and Y:0
p = &Vertex{1, 2} // has type *Vertex
fmt.Println(v1, p, v2, v3)
}