Created
May 22, 2017 10:04
-
-
Save auselen/11011e5fddae40e0e3e6c243a0415961 to your computer and use it in GitHub Desktop.
Go - Closure
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
var hostname = func() func() string { | |
s, _ := os.Hostname() | |
return func() string { | |
return s | |
} | |
}() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment