Skip to content

Instantly share code, notes, and snippets.

@auselen
Created May 22, 2017 10:04
Show Gist options
  • Save auselen/11011e5fddae40e0e3e6c243a0415961 to your computer and use it in GitHub Desktop.
Save auselen/11011e5fddae40e0e3e6c243a0415961 to your computer and use it in GitHub Desktop.
Go - Closure
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