Go is supported in Google functions

・1 min read

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

DISCUSSION (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

Classic DEV Post from May 15 '17

Cleaning up your codebase with a clean architecture

A practical example of using a clean architecture to separate your code across layers while using design patterns effectively.

Renato Suero
I'm a 🇧🇷 software engineer living in 🇳🇱 who loves code, learn and share.

Like what you're reading?
Hit the +FOLLOW button.

❤️