Skip to content

Commit

Permalink
fix: update.DeleteByField*()
Browse files Browse the repository at this point in the history
  • Loading branch information
trakhimenok committed Feb 25, 2025
1 parent 76ab820 commit 638f90a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ func ByFieldPath(fieldPath FieldPath, value any) Update {
return update{fieldPath: fieldPath, value: value}
}

func DeleteByFieldName(fieldName string) Update {
return update{fieldName: fieldName, value: DeleteField}
}

func DeleteByFieldPath(path ...string) Update {
return update{fieldPath: path, value: DeleteField}
}

// update defines an update of a single fieldName
type update struct {
fieldName string
Expand Down

0 comments on commit 638f90a

Please sign in to comment.