Created
December 4, 2018 13:20
-
-
Save betandr/2bd8dfc7033ee21374f514ece6d3a1f5 to your computer and use it in GitHub Desktop.
Structs with pointers in Go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pp := new(Point) | |
*pp = Point{1, 2} | |
// is equvalent to | |
pp := &Point{1, 2} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment