Google, like many tech companies, is always looking for more ways to move computing to their cloud. Google Cloud Functions, for example, lets developers use their Python and Node.js code “serverlessly” in the cloud. Google Cloud Functions has now picked up beta support for Google’s own Go programming language.
Cloud Functions is joining Google App Engine in its support for the Go programming language on the Google Cloud Platform. As, in both cases, the support is based on version 1.11 of Go, released mid last year, Google Cloud Functions is able to offer support for the growing library of Go modules.
As with other compatible languages, Go developers will be able to create two different kinds of functions for Google Cloud Functions, HTTP functions and background functions.
HTTP functions are what their name suggests: functions that are invoked by HTTP requests. They follow the http.HandlerFunc type from the standard library.
In contrast, background functions are triggered in response to an event. Your function might, for example, run every time the contents of a Cloud Storage bucket change.
Developers who wish to get started with using Go in Google Cloud Functions can check out the official quickstart guide.
It’s also important to note that Google’s similarly named Firebase Cloud Functions service does not support Go yet, or Python for that matter.