Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Anlan Du <[email protected]>
  • Loading branch information
anlandu committed Nov 4, 2023
1 parent e798bfd commit 7f7f3d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cmd/gator/sync/verify/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ func run(cmd *cobra.Command, args []string) {
}

if len(missingRequirements) > 0 {
cmdutils.ErrFatalf("The following requirements were not met: \n%v", resultsToString(missingRequirements))
cmdutils.ErrFatalf("the following requirements were not met: \n%v", resultsToString(missingRequirements))
}

if len(templateErrors) > 0 {
cmdutils.ErrFatalf("Encountered errors parsing the following templates: \n%v", resultsToString(templateErrors))
cmdutils.ErrFatalf("encountered errors parsing the following templates: \n%v", resultsToString(templateErrors))
}

fmt.Println("All template requirements met.")
fmt.Println("all template requirements met")
os.Exit(0)
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/gator/sync/verify/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func init() {
}

// Reads a list of unstructured objects and a string containing supported GVKs and
// outputs a set of missing sync requirements per template and ingestion problems per template
// outputs a set of missing sync requirements per template and ingestion problems per template.
func Verify(unstrucs []*unstructured.Unstructured, supportedGVKs SupportedGVKs) (map[string]parser.SyncRequirements, map[string]error, error) {
templates := []*templates.ConstraintTemplate{}
syncedGVKs := map[schema.GroupVersionKind]struct{}{}
Expand All @@ -87,7 +87,7 @@ func Verify(unstrucs []*unstructured.Unstructured, supportedGVKs SupportedGVKs)
}
} else if reader.IsConfig(obj) {
if hasConfig {
return nil, nil, fmt.Errorf("Multiple configs found. Config is a singleton resource.")
return nil, nil, fmt.Errorf("multiple configs found. Config is a singleton resource")
}
config, err := reader.ToConfig(scheme, obj)
if err != nil {
Expand All @@ -112,7 +112,7 @@ func Verify(unstrucs []*unstructured.Unstructured, supportedGVKs SupportedGVKs)
}
templates = append(templates, templ)
} else {
fmt.Printf("Skipping unstructured %q because it is not a syncset, config, or template\n", obj.GetName())
fmt.Printf("skipping unstructured %q because it is not a syncset, config, or template\n", obj.GetName())
}
}

Expand Down

0 comments on commit 7f7f3d9

Please sign in to comment.