Skip to content

Commit

Permalink
Replace : with - in filename
Browse files Browse the repository at this point in the history
  • Loading branch information
anujpaliwal23 committed Jun 26, 2020
1 parent c204f9a commit 0c78e4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/utils/utils.go
Expand Up @@ -22,6 +22,10 @@ func GetResourceFileName(id resid.ResId, res *resource.Resource) (string, error)
return "", err
}

if strings.Contains(name, ":") {
name = strings.ReplaceAll(name, ":", "-")
}

return strings.ToLower(fmt.Sprintf("resources/%s-%s.yaml", name, GetKindAbbreviation(kind))), nil
}

Expand Down

0 comments on commit 0c78e4a

Please sign in to comment.