Skip to content

Instantly share code, notes, and snippets.

@justincampbell
Last active September 10, 2015 13:57
Show Gist options
  • Save justincampbell/8aa5e80176b67fe44db6 to your computer and use it in GitHub Desktop.
Save justincampbell/8aa5e80176b67fe44db6 to your computer and use it in GitHub Desktop.
package main
type Nameable struct {
Name string
}
type Person struct {
Nameable
}
func main() {
justin := Person{Nameable{"Justin"}}
justin.Name = "" // Just using the var
jeff := Person{}
jeff.Name = "Jeff"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment