Skip to content

Commit

Permalink
fix: reference gax import in storage libs
Browse files Browse the repository at this point in the history
The storage client is the only client that imports gax. Depending
on the RPCs being generated it may or may not use the gax import.
To avoid generating an unreferenced lets always import it.
  • Loading branch information
codyoss committed Aug 2, 2024
1 parent a5ddb40 commit 41e1094
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions google-api-go-generator/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,9 @@ func (a *API) GenerateCode() ([]byte, error) {
pn("var _ = context.Canceled")
pn("var _ = internaloption.WithDefaultEndpoint")
pn("var _ = internal.Version")
if a.Name == "storage" {
pn("var _ = gax.Version")
}
pn("")
pn("const apiId = %q", a.doc.ID)
pn("const apiName = %q", a.doc.Name)
Expand Down
1 change: 1 addition & 0 deletions storage/v1/storage-gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 41e1094

Please sign in to comment.