Skip to content

fix --format and --no-header on gradient commands#1862

Open
m3co-code wants to merge 2 commits into
digitalocean:mainfrom
m3co-code:mj/fix-format-header-args-on-gradient
Open

fix --format and --no-header on gradient commands#1862
m3co-code wants to merge 2 commits into
digitalocean:mainfrom
m3co-code:mj/fix-format-header-args-on-gradient

Conversation

@m3co-code

Copy link
Copy Markdown
Contributor

This PR contains two fixes:

  • --format and --no-header was ignored on doctl gradient list-models and list-regions
  • --format ID was not working on the list, even though the header was advertising ID, Id was expected which is inconsistent with the header and the rest of doctl, hence having moved to ID consistently

to fix that "--format ID" renders <nil>

ID is the standard in go and doctl, it was also advertised on the header summary of the command returns, but in the format would have needed to be selected via Id
"github.com/digitalocean/doctl/commands/displayers"
)

func ListRegionsCmd() *Command {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

list-models and list-regions are now registered twice
After this PR, both commands appear duplicated in doctl gradient --help:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thx @DO-rrao! Good catch. I'll spend a little bit more time on that.

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