The Go runtime in the flexible environment is the software stack responsible for building and running your code.
To choose the Go runtime in the flexible environment, add two lines to your
runtime: go env: flex
The Go runtime supports these versions:
It uses the latest stable release of the version you choose. App Engine automatically updates to new release versions upon app deployment, but it will not automatically update the minor version.
For example, your application might be deployed at Go 1.14.10 and later automatically updated to Go 1.14.11, but it will not be automatically updated to Go 1.15.0.
Your code is compiled when you deploy your app to App Engine. When you run the
deployment command, your app's dependencies are first collected from
GOPATH and then they are all sent to the build server. Any missing
dependencies, for example third-party libraries, results in build failures.
To avoid build failures and ensure that all your app's dependencies get deployed with your code, you should test your app locally before deploying it.
Extending the runtime
For instructions on how to extend and customize the Go runtime, read the Go runtime builder on GitHub.
Each instance of your application can use the Compute Engine metadata server to query information about the instance, including its host name, external IP address, instance ID, custom metadata, and service account information. App Engine does not allow you to set custom metadata for each instance, but you can set project-wide custom metadata and read it from your App Engine and Compute Engine instances.
package to access the metadata server.