-
Notifications
You must be signed in to change notification settings - Fork 0
/
opt.go
57 lines (49 loc) · 1.46 KB
/
opt.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package dtomerge
// OptDeRefPointers Sets Options.DeRefPointers
func OptDeRefPointers(deRefPointers bool) Option {
return func(o *Options) {
o.DeRefPointers = deRefPointers
}
}
// OptRespectMergers sets Options.RespectMergers
func OptRespectMergers(respectMergers bool) Option {
return func(o *Options) {
o.RespectMergers = respectMergers
}
}
// OptAtomicTypes sets Options.AtomicTypes
func OptAtomicTypes(atomicTypes AtomicTypes) Option {
return func(o *Options) {
o.AtomicTypes = atomicTypes
}
}
// OptCustomMergeFuncs sets Options.CustomMergeFuncs
func OptCustomMergeFuncs(customMergeFuncs CustomMergeFuncs) Option {
return func(o *Options) {
o.CustomMergeFuncs = customMergeFuncs
}
}
// OptRespectMergeOptionsProviders sets Options.RespectMergeOptionsProviders
func OptRespectMergeOptionsProviders(respectMergeOptionsProviders bool) Option {
return func(o *Options) {
o.RespectMergeOptionsProviders = respectMergeOptionsProviders
}
}
// OptCustomMergeOptions sets Options.CustomMergeOptions
func OptCustomMergeOptions(customMergeOptions CustomMergeOptions) Option {
return func(o *Options) {
o.CustomMergeOptions = customMergeOptions
}
}
// OptIterateMaps sets Options.IterateMaps
func OptIterateMaps(iterateMaps bool) Option {
return func(o *Options) {
o.IterateMaps = iterateMaps
}
}
// OptMergeSlices sets Options.SlicesMerge
func OptMergeSlices(iterateSlices SlicesMergeStrategy) Option {
return func(o *Options) {
o.SlicesMerge = iterateSlices
}
}