Skip to content

Instantly share code, notes, and snippets.

@J7mbo
Created February 22, 2019 12:09
Show Gist options
  • Save J7mbo/e289a2c8f921139be0842448d4351305 to your computer and use it in GitHub Desktop.
Save J7mbo/e289a2c8f921139be0842448d4351305 to your computer and use it in GitHub Desktop.
golang-constructors-blog-8
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