[edit]

p := Vertex{1, 2} // p is a Vertex q := &p // q is a pointer to a Vertex r := &Vertex{1, 2} // r is also a pointer to a Vertex // The type of a pointer to a Vertex is *Vertex // new creates a pointer to a new struct instance var s *Vertex = new(Vertex) $Follow @igor_chubin cheat.sh cheat.sheets