feat(internal/sidekick/gcloud): call the Go client in describe command#5822
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
7ba371b to
c425f93
Compare
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.
c425f93 to
8dabea3
Compare
coryan
approved these changes
May 5, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.