Skip to content

Commit

Permalink
Check for map lenght rather than nil
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 committed Sep 28, 2021
1 parent 4dbb869 commit c262fb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/burner/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func setupDeleteJob(jobConfig config.Job) Executor {
}
gvk := schema.FromAPIVersionAndKind(o.APIVersion, o.Kind)
gvr, _ := meta.UnsafeGuessKindToResource(gvk)
if o.LabelSelector == nil {
if len(o.LabelSelector) == 0 {
log.Fatalf("Empty labelSelectors not allowed with: %s", o.Kind)
}
obj := object{
Expand Down

0 comments on commit c262fb5

Please sign in to comment.