Skip to content

Commit

Permalink
Add nil check before filterAnnotations func in cleanupexamples tool
Browse files Browse the repository at this point in the history
Signed-off-by: Fatih Türken <[email protected]>
  • Loading branch information
turkenf committed Sep 19, 2024
1 parent 44c3fe8 commit 40fd9bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/cleanupexamples/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ func processYAML(yamlData []byte) ([]byte, error) {
return nil, fmt.Errorf("cannot decode the YAML file: %w", err)
}

if u == nil {
continue
}

// Remove specific annotations from the decoded Kubernetes object.
filterAnnotations(u)

Expand Down

0 comments on commit 40fd9bd

Please sign in to comment.