Skip to content

feat(internal/sidekick/gcloud): call the Go client in describe command#5822

Merged
julieqiu merged 1 commit into
googleapis:mainfrom
julieqiu:parallelstore-describe
May 5, 2026
Merged

feat(internal/sidekick/gcloud): call the Go client in describe command#5822
julieqiu merged 1 commit into
googleapis:mainfrom
julieqiu:parallelstore-describe

Conversation

@julieqiu
Copy link
Copy Markdown
Member

@julieqiu julieqiu commented May 5, 2026

A generated describe command used to print the resource path and return. It now creates the Go client for the API, fetches the resource, and prints the response. The generator picks the Go client package and request type from the proto package name.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enables the generation of actual Go client calls for AIP-131 Get methods within the sidekick gcloud generator, replacing the previous print-only placeholders. It introduces a ClientCall structure, logic to resolve Go client package paths from proto packages, and updates the CLI template to handle client initialization and method execution. Feedback suggests using idiomatic zero-value declarations, optimizing the import generation logic to reduce redundant checks within loops, and improving the CLI user experience by outputting responses in JSON format instead of the default string representation.

Comment thread internal/sidekick/gcloud/generate.go Outdated
Comment thread internal/sidekick/gcloud/generate.go Outdated
Comment thread internal/sidekick/gcloud/templates/package/cli.go.tmpl Outdated
@julieqiu julieqiu force-pushed the parallelstore-describe branch 2 times, most recently from 7ba371b to c425f93 Compare May 5, 2026 16:51
A generated describe command used to print the resource path and return.
It now creates the Go client for the API, fetches the resource, and
prints the response. The generator picks the Go client package and
request type from the proto package name.
@julieqiu julieqiu force-pushed the parallelstore-describe branch from c425f93 to 8dabea3 Compare May 5, 2026 17:04
@julieqiu julieqiu marked this pull request as ready for review May 5, 2026 17:33
@julieqiu julieqiu requested review from a team as code owners May 5, 2026 17:33
@julieqiu julieqiu requested review from coryan and removed request for a team May 5, 2026 17:33
@julieqiu julieqiu changed the title feat(internal/sidekick/gcloud): call the Go client in describe actions feat(internal/sidekick/gcloud): call the Go client in describe command May 5, 2026
Comment thread internal/sidekick/gcloud/generate.go
Comment thread internal/sidekick/gcloud/testdata/parallelstore/main.go.golden
@julieqiu julieqiu merged commit 7cbb9bb into googleapis:main May 5, 2026
26 of 29 checks passed
@julieqiu julieqiu deleted the parallelstore-describe branch May 5, 2026 18:27
sofisl pushed a commit that referenced this pull request May 5, 2026
#5822)

A generated describe command used to print the resource path and return.
It now creates the Go client for the API, fetches the resource, and
prints the response. The generator picks the Go client package and
request type from the proto package name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants