Skip to content
Evergreen Evergreen
Documentation

cloud.google.com/go/pubsub is deprecated

Deprecated. The source gives no day. Replacement: cloud.google.com/go/pubsub/v2. Source: cloud.google.com/go/pubsub v1.51.1 go.mod.

Check a version:

evergreen check pkg:golang/cloud.google.com/go/pubsub

The latest cloud.google.com/go/pubsub module declares: “use cloud.google.com/go/pubsub/v2 instead. This version will be supported with bug fixes and security patches until December 31st, 2026. For migration, see https://github.com/googleapis/google-cloud-go/blob/main/pubsub/MIGRATING.md”

Look up another package or runtime · <form action="../lookup.html" method="get" role="search"> </form>

   
Status Deprecated
Severity medium
Ecosystem go
Component pkg:golang/cloud.google.com/go/pubsub
Affected versions vers:golang/*
Date from the source The source gives no day
Replacement cloud.google.com/go/pubsub/v2
Evidence last seen 2026-10-20
Reviewed 2026-10-20 by arminazimi
Review due 2027-04-18 (180 days after the last review)
Rule ID go.module.cloud.google.com.go.pubsub.deprecated

Sources

Migration

Constraints

  • Keep go.mod and go.sum consistent: after the change no package should still require cloud.google.com/go/pubsub, directly or through a replace directive.
  • Check cloud.google.com/go/pubsub/v2 for API differences before switching; it may not be a drop-in replacement for every cloud.google.com/go/pubsub call.

Steps

  1. Replace the deprecated module. Replace the cloud.google.com/go/pubsub requirement with cloud.google.com/go/pubsub/v2 (go get cloud.google.com/go/pubsub/v2@latest), then run go mod tidy.
  2. Migrate imports and calls. Update imports and calls of cloud.google.com/go/pubsub in the reported files to cloud.google.com/go/pubsub/v2.

Verification

  • go build ./... && go test ./...: Build and test every package without the deprecated module.
  • go mod tidy && git diff --exit-code go.mod go.sum: Confirm go.mod and go.sum are tidy after the replacement.

Detected by

The go detector. See Detectors and Compatibility.

Same ecosystem

Data

This page is generated from registry/go.json, rule go.module.cloud.google.com.go.pubsub.deprecated, in the ebb.registry.v2 format (how rules are written). A CLE (ECMA-428) export is not published yet. The same facts are embedded in this page as schema.org structured data.

Last updated