mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-27 21:31:59 +00:00
Improve help
This commit is contained in:
parent
9e4d9f9ca4
commit
b3b16ceccc
2 changed files with 13 additions and 2 deletions
|
|
@ -217,7 +217,7 @@ func getFiles(files []string, fileBatches chan []string, validationResults chan
|
|||
func realMain() int {
|
||||
var schemaLocationsParam arrayParam
|
||||
var skipKindsCSV, k8sVersion, outputFormat string
|
||||
var summary, strict, verbose, ignoreMissingSchemas bool
|
||||
var summary, strict, verbose, ignoreMissingSchemas, help bool
|
||||
var nWorkers int
|
||||
var err error
|
||||
var files []string
|
||||
|
|
@ -231,8 +231,19 @@ func realMain() int {
|
|||
flag.BoolVar(&strict, "strict", false, "disallow additional properties not in schema")
|
||||
flag.StringVar(&outputFormat, "output", "text", "output format - text, json")
|
||||
flag.BoolVar(&verbose, "verbose", false, "print results for all resources")
|
||||
flag.BoolVar(&help, "h", false, "show help information")
|
||||
flag.Usage = func() {
|
||||
fmt.Fprintf(os.Stderr, "Usage: %s [OPTION]... [FILE OR FOLDER]...\n", os.Args[0])
|
||||
flag.PrintDefaults()
|
||||
}
|
||||
|
||||
flag.Parse()
|
||||
|
||||
if help {
|
||||
flag.Usage()
|
||||
return 1
|
||||
}
|
||||
|
||||
skipKinds := skipKindsMap(skipKindsCSV)
|
||||
|
||||
for _, file := range flag.Args() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue