-
-
Save krancour/4a02d5f077e57347b4e2ca78942bf9b6 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 greetingFn variable is func(string) error | |
var greetingFn func(string) error = EnglishGreeting | |
// The next line doesn't care what implementation of func(string) error is used | |
if err := greetingFn("World"); err != nil { | |
log.Fatal(err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment