DEV Community

Renato Suero
Renato Suero

Posted on

Go is supported in Google functions

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!") } 
Enter fullscreen mode Exit fullscreen mode

Deploy:

gcloud functions deploy HelloGet --runtime go111 --trigger-http 
Enter fullscreen mode Exit fullscreen mode

Top comments (2)

Collapse
 
shindakun profile image
Steve Layton • Edited

Thanks for this posting! Meant to try this out yesterday and forgot all about it.

Collapse
 
renatosuero profile image
Renato Suero

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