diff --git a/cmd/cleanupexamples/main.go b/cmd/cleanupexamples/main.go index 2f8538d..1a5dde4 100644 --- a/cmd/cleanupexamples/main.go +++ b/cmd/cleanupexamples/main.go @@ -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)