-
-
Save krancour/ed9d05bc4ecbc31fc8ce063356d2353f 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
func main() { | |
// The type of the greeter variable is the Greeter interface; NOT the | |
// EnglishGreeter type that implements it | |
var greeter Greeter = &EnglishGreeter{} | |
// The next line doesn't care what implementation of Greeter is used | |
greeter.SayGreeting() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment