Add JSON/YAML annotations to Config struct

Co-authored-by: Ahmed AbouZaid <6760103+aabouzaid@users.noreply.github.com>
This commit is contained in:
Yann Hamon 2023-04-23 13:55:09 +02:00
parent d038bf8840
commit ad935b7e32

View file

@ -8,24 +8,24 @@ import (
) )
type Config struct { type Config struct {
Cache string Cache string `yaml:"cache" json:"cache"`
Debug bool Debug bool `yaml:"debug" json:"debug"`
ExitOnError bool ExitOnError bool `yaml:"exitOnError" json:"exitOnError"`
Files []string Files []string `yaml:"files" json:"files"`
SchemaLocations []string Help bool `yaml:"help" json:"help"`
SkipTLS bool IgnoreFilenamePatterns []string `yaml:"ignoreFilenamePatterns" json:"ignoreFilenamePatterns"`
SkipKinds map[string]struct{} IgnoreMissingSchemas bool `yaml:"ignoreMissingSchemas" json:"ignoreMissingSchemas"`
RejectKinds map[string]struct{} KubernetesVersion string `yaml:"kubernetesVersion" json:"kubernetesVersion"`
OutputFormat string NumberOfWorkers int `yaml:"numberOfWorkers" json:"numberOfWorkers"`
KubernetesVersion string OutputFormat string `yaml:"output" json:"output"`
NumberOfWorkers int RejectKinds map[string]struct{} `yaml:"reject" json:"reject"`
Summary bool SchemaLocations []string `yaml:"schemaLocations" json:"schemaLocations"`
Strict bool SkipKinds map[string]struct{} `yaml:"skip" json:"skip"`
Verbose bool SkipTLS bool `yaml:"insecureSkipTLSVerify" json:"insecureSkipTLSVerify"`
IgnoreMissingSchemas bool Strict bool `yaml:"strict" json:"strict"`
IgnoreFilenamePatterns []string Summary bool `yaml:"summary" json:"summary"`
Help bool Verbose bool `yaml:"verbose" json:"verbose"`
Version bool Version bool `yaml:"version" json:"version"`
} }
type arrayParam []string type arrayParam []string