Created
February 22, 2019 12:09
-
-
Save J7mbo/e289a2c8f921139be0842448d4351305 to your computer and use it in GitHub Desktop.
golang-constructors-blog-8
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
type MyStruct struct { | |
child *ChildStruct | |
} | |
func (s *MyStruct) StructFunc() { | |
if s.child != nil { | |
fmt.Println(s.child.num) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment