Access legacy bundled services for Go

This page describes how to install and use the bundledservices with theGo runtimefor App Engine standard environment. Your app can access the bundled servicesthrough theApp Engine services SDK for Go.

Before you begin

Installing the App Engine services SDK

In order to call the legacy bundled services APIs with Go, youmust use the latest SDK. Follow these steps:

  1. Update yourapp.yamlfile to include the following line:

    app_engine_apis:true
  2. Add a reference to the latest SDK in yourgo.mod file by runninggo getin the terminal as follows:

    gogetgoogle.golang.org/appengine/v2

    The main difference when upgrading to Go is using v2 of the App Engine services SDK.

  3. In your app, modify your import statements by inserting/v2/ in the oldpackage names. For example, if using Memcache, do the following:

    import("google.golang.org/appengine/v2""google.golang.org/appengine/v2/memcache")

    For the full list of available package names, see thelegacy bundled services API references documentation.

  4. Rungo mod tidy to clean up references in yourgo.mod file.

    gomodtidy
Note: When upgrading to a new major version of a Go dependency, such as a packageor library, make sure to include the major version number of the dependency inyour import statements. If you rungo mod tidy and find thatit is still importing an older version of the App Engine services SDK for Go,you have probably missed upgrading an import statement.

Migration considerations

You should be aware of the following considerations if you are migrating tothe Go runtime and your app uses legacy bundled services:

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-05 UTC.