Setting up your development environment Stay organized with collections Save and categorize content based on your preferences.
Prepare your environment forGo app development and deployment on Google Cloud by installingthe following tools.
Install Go
To install Go, seeGo Getting Started.
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.
mainpackage to App Engine, run the following command:gcloudappdeployTo 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:
If you already have a Go module for your project, change to that directory.Otherwise, create a module:
go mod initYOUR_MODULE_NAME
Replace
YOUR_MODULE_NAMEwith the name of the new module.Use the Cloud Storage package in your project:
Note: The source of the Cloud Client Libraries for Go ison GitHubgo get cloud.google.com/go/storage
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
Learn more aboutGo on Google Cloud.
Deploy a Go app onApp Engine.
Exploreauthentication methods at Google.
Browse thedocumentation for Google Cloud products.
Clone theGo samples repository from GitHub.
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.