Developing in Go. Overview
With Cloud Functions, you can run applications written in Go
This service provides several runtimes with different versions. We do not recommend using runtime versions that are no longer supported.
| Name | Go version | Operating system |
Preloaded | Supported by Cloud Functions |
|---|---|---|---|---|
| golang116 | 1.16.15 | Ubuntu 18.04 | No | No |
| golang117 | 1.17.8 | Ubuntu 18.04 | No | No |
| golang118 | 1.18.5 | Ubuntu 18.04 | No | No |
| golang119 | 1.19.3 | Ubuntu 18.04 | No | No |
| golang121 | 1.21.9 | Ubuntu 22.04 LTS | No | No |
| golang123 | 1.23.9 | Ubuntu 22.04 LTS | No | Yes |
You can add an SDK library
When creating a new function version, the builder will automatically install all declared dependencies required for the function. For more information about requirements and limitations, see Building and managing Go function dependencies.
Warning
The go.mod file must not specify the Go version, since the plugin generated by the builder must use exactly the same Go version as the runtime environment.
The runtime automatically loads your code and invokes the request handler you specified. It receives the incoming request and the invocation context as arguments. The context contains additional information about the function parameters.
Cloud Functions automatically captures the application's standard output streams and sends them to the centralized logging system in Yandex Cloud. This system also logs entries about the start and end of each function execution, as well as any errors that occur during execution. For more information about the log format, see Go function execution logging.
To learn more about programming in Go or how certain constructs work, we recommend taking this tour of Go