Skip to content

Commit fffff7f

Browse files
authored
fix: reference gax import in storage libs (#2720)
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.
1 parent a5ddb40 commit fffff7f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

google-api-go-generator/gen.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,9 @@ func (a *API) GenerateCode() ([]byte, error) {
858858
pn("var _ = context.Canceled")
859859
pn("var _ = internaloption.WithDefaultEndpoint")
860860
pn("var _ = internal.Version")
861+
if a.Name == "storage" {
862+
pn("var _ = gax.Version")
863+
}
861864
pn("")
862865
pn("const apiId = %q", a.doc.ID)
863866
pn("const apiName = %q", a.doc.Name)

storage/v1/storage-gen.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)