Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable printing results in color #350

Merged
merged 1 commit into from
Jul 28, 2021
Merged

Conversation

genevieveluyt
Copy link
Contributor

Description

Exposes a WithColor printer option that can be used to disable color formatting when printing results.

Type of change
  • Bug fix πŸ›
  • New feature ✨
  • This change requires a documentation update πŸ“–
  • Breaking changes ⚠️
How Has This Been Tested?
Checklist:
  • I have 🎩 my changes (A 🎩 specifically includes pulling down changes, setting them up, and manually testing the changed features and potential side effects to make sure nothing is broken)
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The test coverage did not decrease
  • [NA] I have signed the appropriate Contributor License Agreement

// Results are printed to standard out by default. To print to a string instead:
//
// var buf bytes.Buffer
// report.PrintResults(kubeaudit.WithWriter(&buf), kubeaudit.WithColor(false))
Copy link
Contributor

Choose a reason for hiding this comment

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

πŸ‘

@genevieveluyt genevieveluyt enabled auto-merge (squash) July 28, 2021 15:24
@genevieveluyt genevieveluyt merged commit 47c31d5 into main Jul 28, 2021
@genevieveluyt genevieveluyt deleted the color-output branch July 28, 2021 15:32
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.

None yet

2 participants