Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Clearing Help Text #61

Merged
merged 1 commit into from
May 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ require (
github.com/spf13/cobra v0.0.6
golang.org/x/net v0.0.0-20200301022130-244492dfa37a
)

replace github.com/imdario/mergo => github.com/cwarden/mergo v0.3.12-0.20210528180603-9b708ca2c584
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cwarden/mergo v0.3.12-0.20210528180603-9b708ca2c584 h1:XSEGteLsF2wBKvdDLosPEl3WsUNgnheAmjtU5vQ8TV0=
github.com/cwarden/mergo v0.3.12-0.20210528180603-9b708ca2c584/go.mod h1:EKrIwxq7vAFm5c42qpRoClmx16ahAuLuVnEXbXTobpE=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
Expand Down
2 changes: 1 addition & 1 deletion objects/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (o *CustomObject) UpdateField(fieldName string, updates Field) error {
for i, f := range o.Fields {
if f.FullName == fieldName {
found = true
if err := mergo.Merge(&updates, f); err != nil {
if err := mergo.Merge(&updates, f, mergo.WithNoOverrideEmptyStructValues); err != nil {
return errors.Wrap(err, "merging field updates")
}
o.Fields[i] = updates
Expand Down