Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add verbose and extended-perfdata flags #274
Here's a first draft of something to satisfy #259
It adds a --verbose (-v) and a --extended-perfdata (-E) BoolFlag to both the validate and serve commands.
I've passed this in using a simple struct "OutputConfig" that has no affect on any output other than the nagios output currently.
With the --verbose flag the output is the same as the nagios_verbose output:
With the --extended-perfdata flag:
With both flags:
I'm mixed on this approach, it'll work, but not very clear for the user which flags are for which formatter.
I wonder how these approaches would compare:
PS: @pysysops, thanks for taking a go at this, and all your other contributions so far.
Hey, thanks for the feedback, it was a first "draft" and as always I greatly appreciate feedback and suggestions it only helps create a better product and improves my taming and understanding of golang.
I've committed a change to allow passing of format-options as a StringSliceFlag. This means options can be passed like:
or short form:
I'm looking into making the help output more informative to the user and will hopefully hava a commit to improve it soon(ish).
Hi @aelsabbahy hop you're well :)
Thought I'd revisit this PR. I've tidied up the commits a bit.
I thought I'd take an approach that is already used to add output-ers to the list of valid
Adding options to the cli that aren't implemented / don't exist for a format has no impact.