File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ func main() {
45
45
46
46
## Options
47
47
### Filter patches using Predicates
48
- The option ` WithPredicate ` set a patch ` Predicate ` which can be used to filter or validate the patch creation.
49
- For each kind (` add ` , ` remove ` and ` replace ` ) of a patch a dedicated filter function can be configured. The
48
+ The option ` WithPredicate ` sets a patch ` Predicate ` which can be used to filter or validate the patch creation.
49
+ For each kind of patch (` add ` , ` remove ` and ` replace ` ) a dedicated filter function can be configured. The
50
50
predicate will be checked before a patch is created, or the JSON object is processed further.
51
51
52
52
#### Example
@@ -140,8 +140,8 @@ func main() {
140
140
141
141
### Ignore slice order
142
142
There are two options to ignore the slice order:
143
- - ` IgnoreSliceOrder ` will ignore the order of all slices of built-in in types (e.g. ` int ` , ` string ` ) during the patch creation
144
- and will use instead the value itself in order to match and compare the current and modified JSON.
143
+ - ` IgnoreSliceOrder ` will ignore the order of all slices of built-in types (e.g. ` int ` , ` string ` ) during the patch creation
144
+ and will instead use the value itself in order to match and compare the current and modified JSON.
145
145
- ` IgnoreSliceOrderWithPattern ` allows to specify for which slices the order should be ignored using JSONPointer patterns (e.g. ` /jobs ` , ` /jobs/* ` ).
146
146
Furthermore, the slice order of structs (and pointer of structs) slices can be ignored by specifying a JSON field which should be used
147
147
to match the struct values.
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ func WithPrefix(prefix []string) Option {
28
28
}
29
29
}
30
30
31
- // IgnoreSliceOrder will ignore the order of all slices of built-in in types during the walk and will use instead the value
31
+ // IgnoreSliceOrder will ignore the order of all slices of built-in types during the walk and will use instead the value
32
32
// itself in order to compare the current and modified JSON.
33
33
// NOTE: ignoring order only works if the elements in each slice are unique
34
34
func IgnoreSliceOrder () Option {
You can’t perform that action at this time.
0 commit comments