Official Go packages for calling Google Cloud Platform services with less boilerplate. Libraries use Application Default Credentials and cover a large catalog of GCP APIs.
Overview
Google Cloud Client Libraries for Go are the recommended way for Go applications to reach Google Cloud APIs programmatically. Each package targets a specific service—storage, Pub/Sub, BigQuery, Compute, and many others—with high-level abstractions aligned to Go idioms.
The libraries cut down repetitive setup code while fitting the standard library and typical project layout. An extensive reference lists import paths for individual APIs, from AI Platform and AlloyDB through monitoring, Run, and Vision.
By default, clients pick up Application Default Credentials. On Google Compute Engine, Kubernetes Engine, or App Engine, credentials are supplied by the environment; for local development the gcloud CLI can place user credentials where ADC expects them, or you can point to a service account key via environment variables or explicit client options.
Compatibility tracks the two most recent major Go releases, matching Go’s own support policy. Some packages may still change in backward-incompatible ways while under active development.
Key features
- Per-service Go modules for GCP APIs
- Application Default Credentials support
- Service account key configuration
- Custom credentials via options package
- High-level API abstractions
- Broad catalog across GCP products
- Works on GCP hosted runtimes
- Local development auth via gcloud
Use cases
- Building Go apps on Cloud Storage
- Publishing messages with Cloud Pub/Sub
- Querying BigQuery from Go services
- Managing Compute Engine resources
- Running workloads on Cloud Run or GKE