Skip to content

Instantly share code, notes, and snippets.

@grant
Created November 6, 2019 19:00
Show Gist options
  • Select an option

  • Save grant/78f24cc9cadd382de7161257c1873576 to your computer and use it in GitHub Desktop.

Select an option

Save grant/78f24cc9cadd382de7161257c1873576 to your computer and use it in GitHub Desktop.
Go Functions Framework – Hello, World
package hello
import (
"net/http"
"fmt"
)
// HelloWorld writes "Hello, World!" to the HTTP response.
func HelloWorld(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "Hello, World!\n")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment