Skip to content

Instantly share code, notes, and snippets.

@mweagle
Created September 28, 2017 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mweagle/18bdf3a772bc54e9eb8ccd903e3ed710 to your computer and use it in GitHub Desktop.
Save mweagle/18bdf3a772bc54e9eb8ccd903e3ed710 to your computer and use it in GitHub Desktop.
// Standard http.HandlerFunc() that will be run as a lambda function
func helloSpartaWorld(w http.ResponseWriter, r *http.Request) {
messageText := os.Getenv("MESSAGE")
if "" == messageText {
messageText = "$MESSAGE not defined"
}
fmt.Fprint(w, messageText)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment