2 min read

Yesterday, Google Cloud announced a new Go 1.11 runtime for the App Engine standard environment. This provides all the benefits of App Engine such as paying only for what you use, automatic scaling and managed infrastructure.

Starting with Go 1.11, which was launched in August this year, Go on App Engine has no limits on application structure, supported packages, context.Context values, or HTTP clients.

What are the changes in the Go 1.11 runtime as compared to Go 1.9?

1. Now, you can specify the Go 1.11 runtime in your app.yaml file by adding the following line:

runtime: go111

2. Each of your services must include a package main statement in at least one source file.

3. The appengine build tag is now deprecated and will no longer be used when building an app for deployment.

4. The way you import dependencies has changed. You can specify the dependencies in this runtime by the following two ways:

  • Putting your application and related code in your GOPATH.
  • Or else, by creating a go.mod file to define your module.

5. Google App Engine now does not modify the Go toolchain to include the appengine package. Using Google Cloud client library or third party libraries instead of the App Engine-specific APIs is recommended.

6. You can deploy services that use the Go 1.11 runtime using the gcloud app deploy command. You can still use the appcfg.py commands the Go 1.9 runtime, but the gcloud command-line tool is preferred.

This release of the Go 1.11 runtime in the App Engine uses the latest stable release of Go 1.11 and will automatically update to new minor versions upon deployment but will not for any major versions. Also, it is currently in beta and might be changed in backward-incompatible ways in future.

You can read more about Go 1.11 runtime on The Go Blog and also the documentation published by Google.

Read Next

Golang plans to add a core implementation of an internal language server protocol

Why Golang is the fastest growing language on GitHub

Golang 1.11 is here with modules and experimental WebAssembly port among other updates