Setting up your development environment

Prepare your environment forGo app development and deployment on Google Cloud by installingthe following tools.

Install Go

  1. To install Go, seeGo Getting Started.

  2. Confirm that you have the most recent version of Go installed:

    goversion

Install an editor

To maximize your Go development efficacy, thesepopular editor plugins and IDEs provide the following features:

  • Fully integrated debugging capabilities
  • Syntax highlighting
  • Code completion

Install the Google Cloud CLI

TheGoogle Cloud CLI is a set of tools for Google Cloud. It contains thegcloud andbq command-line tools used to access Compute Engine, Cloud Storage,BigQuery, and other services from the command line. You can run thesetools interactively or in your automated scripts.

For example, todeploy a Go web app with amainpackage to App Engine, run the following command:

gcloudappdeploy

To install the gcloud CLI, seeInstalling the gcloud CLI.

Install the Cloud Client Libraries for Go

TheCloud Client Libraries for Go is the idiomatic way for Go developers to integrate withGoogle Cloud services, such as Datastore and Cloud Storage.

For example, to install the package for an individual API, such as the Cloud Storage API,do the following:

  1. If you already have a Go module for your project, change to that directory.Otherwise, create a module:

    go mod initYOUR_MODULE_NAME

    ReplaceYOUR_MODULE_NAME with the name of the new module.

  2. Use the Cloud Storage package in your project:

    go get cloud.google.com/go/storage

    Note: The source of the Cloud Client Libraries for Go ison GitHub

Set up authentication

To use the Cloud Client Libraries in a local development environment, setup Application Default Credentials.

If you're using a local shell, then create local authentication credentials for your user account:

gcloudauthapplication-defaultlogin

You don't need to do this if you're using Cloud Shell.

If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.

For more information, seeAuthenticate for using client libraries.

Install other useful tools

For a comprehensive list of Go tools and libraries, seethis list of Go frameworks, libraries, and software on GitHub.

What's next

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-18 UTC.