Skip to content

Instantly share code, notes, and snippets.

@iansmith
Last active March 4, 2020 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iansmith/d2e1c7f46c03a5f72499ddf9ac366564 to your computer and use it in GitHub Desktop.
Save iansmith/d2e1c7f46c03a5f72499ddf9ac366564 to your computer and use it in GitHub Desktop.
type Spider struct {}
func (s Spider) NumberOfLegs() int {
return 8
}
func (s Spider) Genus() {
returnLatrodectus//strictly speaking, the genus of Black Widow spider
}
type Dog struct {}
func (d Dog) NumberOfLegs() int {
return 4
}
func (d Dog) Genus() {
returnCanin
}
type Stool struct {}
func (s Stool) NumberOfLegs() int {
return 3
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment