From ad935b7e32c87e15eef936614a571091d3b67f28 Mon Sep 17 00:00:00 2001 From: Yann Hamon Date: Sun, 23 Apr 2023 13:55:09 +0200 Subject: [PATCH] Add JSON/YAML annotations to Config struct Co-authored-by: Ahmed AbouZaid <6760103+aabouzaid@users.noreply.github.com> --- pkg/config/config.go | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 17ec67f..093454e 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -8,24 +8,24 @@ import ( ) type Config struct { - Cache string - Debug bool - ExitOnError bool - Files []string - SchemaLocations []string - SkipTLS bool - SkipKinds map[string]struct{} - RejectKinds map[string]struct{} - OutputFormat string - KubernetesVersion string - NumberOfWorkers int - Summary bool - Strict bool - Verbose bool - IgnoreMissingSchemas bool - IgnoreFilenamePatterns []string - Help bool - Version bool + Cache string `yaml:"cache" json:"cache"` + Debug bool `yaml:"debug" json:"debug"` + ExitOnError bool `yaml:"exitOnError" json:"exitOnError"` + Files []string `yaml:"files" json:"files"` + Help bool `yaml:"help" json:"help"` + IgnoreFilenamePatterns []string `yaml:"ignoreFilenamePatterns" json:"ignoreFilenamePatterns"` + IgnoreMissingSchemas bool `yaml:"ignoreMissingSchemas" json:"ignoreMissingSchemas"` + KubernetesVersion string `yaml:"kubernetesVersion" json:"kubernetesVersion"` + NumberOfWorkers int `yaml:"numberOfWorkers" json:"numberOfWorkers"` + OutputFormat string `yaml:"output" json:"output"` + RejectKinds map[string]struct{} `yaml:"reject" json:"reject"` + SchemaLocations []string `yaml:"schemaLocations" json:"schemaLocations"` + SkipKinds map[string]struct{} `yaml:"skip" json:"skip"` + SkipTLS bool `yaml:"insecureSkipTLSVerify" json:"insecureSkipTLSVerify"` + Strict bool `yaml:"strict" json:"strict"` + Summary bool `yaml:"summary" json:"summary"` + Verbose bool `yaml:"verbose" json:"verbose"` + Version bool `yaml:"version" json:"version"` } type arrayParam []string