Skip to content

Commit

Permalink
don't print errors if it's not a unmarshallable yaml. Just skip that …
Browse files Browse the repository at this point in the history
…file and do the rest
  • Loading branch information
Erik Svensson committed Nov 13, 2023
1 parent 231035b commit 2ce5d8c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion helpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ func GetYamlKindName(y string) (string, string, error) {
var r models.KubeResource
err := yaml.Unmarshal([]byte(y), &r)
if err != nil {
fmt.Printf("couldn't unmarshal yaml, %v\n", err)
return "", "", err
}
if r.Kind == "" {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func main() {

kind, name, err := helpers.GetYamlKindName(str)
if err != nil {
os.Exit(2)
continue
}
fn = fmt.Sprintf("%v-%v.yaml", name, kind)
var filePath []string
Expand Down

0 comments on commit 2ce5d8c

Please sign in to comment.