Last active
September 10, 2015 13:57
-
-
Save justincampbell/8aa5e80176b67fe44db6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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