Use k8s schema to determine formatting if no type on setter

This commit is contained in:
Morten Torkildsen
2020-07-31 13:44:47 -07:00
parent feeaa994b7
commit 5c433ead5e
5 changed files with 26 additions and 15 deletions

View File

@@ -45,7 +45,7 @@ func (d *Delete) visitMapping(_ *yaml.RNode, _ string, _ *openapi.ResourceSchema
// visitScalar implements visitor
// visitScalar will remove the reference on each scalar field whose name matches.
func (d *Delete) visitScalar(object *yaml.RNode, p string, _ *openapi.ResourceSchema) error {
func (d *Delete) visitScalar(object *yaml.RNode, p string, _, _ *openapi.ResourceSchema) error {
// check if the field matches
if d.FieldName != "" && !strings.HasSuffix(p, d.FieldName) {
return nil