1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 05:40:11 +01:00

Set the default of 'validatorpresets' to 'mandatory'.

This commit is contained in:
Sascha L. Teichmann 2023-01-27 17:16:45 +01:00
parent e004939abf
commit 2a40ab6393
2 changed files with 7 additions and 4 deletions

View file

@ -41,7 +41,7 @@ type options struct {
RemoteValidator string `long:"validator" description:"URL to validate documents remotely" value-name:"URL"` RemoteValidator string `long:"validator" description:"URL to validate documents remotely" value-name:"URL"`
RemoteValidatorCache string `long:"validatorcache" description:"FILE to cache remote validations" value-name:"FILE"` RemoteValidatorCache string `long:"validatorcache" description:"FILE to cache remote validations" value-name:"FILE"`
RemoteValidatorPresets []string `long:"validatorpreset" description:"One or more presets to validate remotely"` RemoteValidatorPresets []string `long:"validatorpreset" description:"One or more presets to validate remotely" default:"mandatory"`
clientCerts []tls.Certificate clientCerts []tls.Certificate
} }
@ -172,7 +172,9 @@ func run(opts *options, domains []string) (*Report, error) {
func main() { func main() {
opts := new(options) opts := new(options)
domains, err := flags.Parse(opts) parser := flags.NewParser(opts, flags.Default)
parser.Usage = "[OPTIONS] domain..."
domains, err := parser.Parse()
errCheck(err) errCheck(err)
if opts.Version { if opts.Version {

View file

@ -3,7 +3,8 @@
### Usage ### Usage
``` ```
csaf_checker [OPTIONS] Usage:
csaf_checker [OPTIONS] domain...
Application Options: Application Options:
-o, --output=REPORT-FILE File name of the generated report -o, --output=REPORT-FILE File name of the generated report
@ -17,7 +18,7 @@ Application Options:
-y, --years=YEARS Number of years to look back from now -y, --years=YEARS Number of years to look back from now
--validator=URL URL to validate documents remotely --validator=URL URL to validate documents remotely
--validatorcache=FILE FILE to cache remote validations --validatorcache=FILE FILE to cache remote validations
--validatorpreset= One or more presets to validate remotely --validatorpreset= One or more presets to validate remotely (default: mandatory)
Help Options: Help Options:
-h, --help Show this help message -h, --help Show this help message