mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-25 20:51:57 +00:00
further breakdown of main function
This commit is contained in:
parent
0cb1f40f24
commit
1eaa259006
1 changed files with 2 additions and 3 deletions
5
main.go
5
main.go
|
|
@ -137,9 +137,9 @@ func (ap *arrayParam) Set(value string) error {
|
||||||
func getLogger(outputFormat string, printSummary, quiet bool) (output.Output, error) {
|
func getLogger(outputFormat string, printSummary, quiet bool) (output.Output, error) {
|
||||||
switch {
|
switch {
|
||||||
case outputFormat == "text":
|
case outputFormat == "text":
|
||||||
return output.NewTextOutput(printSummary, quiet)
|
return output.NewTextOutput(printSummary, quiet), nil
|
||||||
case outputFormat == "json":
|
case outputFormat == "json":
|
||||||
return output.NewJSONOutput(printSummary, quiet)
|
return output.NewJSONOutput(printSummary, quiet), nil
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("-output must be text or json")
|
return nil, fmt.Errorf("-output must be text or json")
|
||||||
}
|
}
|
||||||
|
|
@ -216,7 +216,6 @@ func realMain() int {
|
||||||
logWG.Add(1)
|
logWG.Add(1)
|
||||||
|
|
||||||
success := true
|
success := true
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
defer logWG.Done()
|
defer logWG.Done()
|
||||||
for results := range validationResults {
|
for results := range validationResults {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue