golang/cloud-function-hello-world/hello_world.go (12 lines of code) (raw):

// Package helloworld provides a set of Cloud Functions samples. package helloworld import ( "fmt" "net/http" "github.com/GoogleCloudPlatform/functions-framework-go/functions" ) func init() { functions.HTTP("HelloGet", helloGet) } // helloGet is an HTTP Cloud Function. func helloGet(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, "Hello, World!") }