Created
October 2, 2021 20:42
-
-
Save mkock/22698a09ce4e9f8b4901913b2b45fc17 to your computer and use it in GitHub Desktop.
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
// University is defined in package schools | |
type University struct { | |
school.School | |
} | |
func (u University) Name() string { return "Copenhagen Highschool" } | |
func (u University) Location() string { return "Copenhagen City Center" } | |
// func (u University) students() []string { return []string{"George", "Ben", "Louise", "Calvin"} } // Can't redefine. | |
var _ school.School = University{} // Works! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment