Now we can use Go to run google functions =). Take a look an example:
// Package helloworld provides a set of Cloud Function samples.
package helloworld
import (
"fmt"
"net/http"
)
// HelloGet is an HTTP Cloud Function.
func HelloGet(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "Hello, World!")
}
Deploy:
gcloud functions deploy HelloGet --runtime go111 --trigger-http
Top comments (2)
Thanks for this posting! Meant to try this out yesterday and forgot all about it.
I'm excited to test more too =).
I want to write a tutorial showing how to create an endpoint, test and deploy using gitlab-ci