Skip to content

Add common --format flag support#3454

Merged
ehl-jf merged 1 commit into
masterfrom
JGC-471-format-support
Apr 30, 2026
Merged

Add common --format flag support#3454
ehl-jf merged 1 commit into
masterfrom
JGC-471-format-support

Conversation

@ehl-jf
Copy link
Copy Markdown
Contributor

@ehl-jf ehl-jf commented Apr 24, 2026

  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • The pull request is targeting the master branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....

@github-actions
Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@ehl-jf ehl-jf added the safe to test Approve running integration tests on a pull request label Apr 24, 2026
Comment thread config/cli.go
Comment on lines +227 to +228
case coreformat.Json:
return printConfigShowJSON(configs)
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.

do we have a way to make this a common function so sub command creator dont worry about it ?

Comment thread general/token/cli.go Outdated
return nil
// getTokenOutputFormat returns the requested output format, defaulting to json
// to preserve backward-compatible behaviour (the command always emitted JSON).
func getTokenOutputFormat(c *cli.Context) (coreformat.OutputFormat, error) {
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.

make it common in cli context ?

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.

cli.Context is in urfave/cli. But it is doable in plugins that use our own encapsulation of context.

@ehl-jf ehl-jf force-pushed the JGC-471-format-support branch from 5e1d2fa to 7bf5ae2 Compare April 30, 2026 10:16
@ehl-jf ehl-jf added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Apr 30, 2026
@ehl-jf ehl-jf force-pushed the JGC-471-format-support branch from 7bf5ae2 to 3b95d48 Compare April 30, 2026 10:27
@ehl-jf ehl-jf added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Apr 30, 2026
@ehl-jf ehl-jf force-pushed the JGC-471-format-support branch from 3b95d48 to fdbab1d Compare April 30, 2026 10:42
@ehl-jf ehl-jf added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Apr 30, 2026
@ehl-jf ehl-jf force-pushed the JGC-471-format-support branch from fdbab1d to 9b2e6bd Compare April 30, 2026 11:01
@ehl-jf ehl-jf added safe to test Approve running integration tests on a pull request improvement Automatically generated release notes and removed safe to test Approve running integration tests on a pull request labels Apr 30, 2026
@ehl-jf ehl-jf force-pushed the JGC-471-format-support branch from 9b2e6bd to af54846 Compare April 30, 2026 11:17
@ehl-jf ehl-jf added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Apr 30, 2026
@ehl-jf ehl-jf force-pushed the JGC-471-format-support branch from af54846 to 83d204e Compare April 30, 2026 12:15
@ehl-jf ehl-jf added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Apr 30, 2026
@ehl-jf ehl-jf force-pushed the JGC-471-format-support branch from 83d204e to 25b9864 Compare April 30, 2026 13:00
@ehl-jf ehl-jf added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Apr 30, 2026
@ehl-jf ehl-jf force-pushed the JGC-471-format-support branch from 25b9864 to fe21cb8 Compare April 30, 2026 14:15
@ehl-jf ehl-jf added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Apr 30, 2026
@ehl-jf ehl-jf force-pushed the JGC-471-format-support branch from fe21cb8 to 5af9d26 Compare April 30, 2026 14:26
@ehl-jf ehl-jf added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Apr 30, 2026
@ehl-jf ehl-jf merged commit 83fb5d2 into master Apr 30, 2026
85 of 88 checks passed
@ehl-jf ehl-jf deleted the JGC-471-format-support branch April 30, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Automatically generated release notes safe to test Approve running integration tests on a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants