MCPcopy
hub / github.com/google/go-cmp / Option

Interface Option

cmp/options.go:25–33  ·  cmp/options.go::Option

Option configures for specific behavior of [Equal] and [Diff]. In particular, the fundamental Option functions ([Ignore], [Transformer], and [Comparer]), configure how equality is determined. The fundamental options may be composed with filters ([FilterPath] and [FilterValues]) to control the scope

Source from the content-addressed store, hash-verified

23// The [github.com/google/go-cmp/cmp/cmpopts] package provides helper functions
24// for creating options that may be used with [Equal] and [Diff].
25type Option interface {
26 // filter applies all filters and returns the option that remains.
27 // Each option may only read s.curPath and call s.callTTBFunc.
28 //
29 // An Options is returned only if multiple comparers or transformers
30 // can apply simultaneously and will only contain values of those types
31 // or sub-Options containing values of those types.
32 filter(s *state, t reflect.Type, vx, vy reflect.Value) applicableOption
33}
34
35// applicableOption represents the following types:
36//

Callers 4

tryOptionsMethod · 0.65
filterMethod · 0.65
filterMethod · 0.65
filterMethod · 0.65

Implementers 12

pathFiltercmp/options.go
valuesFiltercmp/options.go
ignorecmp/options.go
validatorcmp/options.go
transformercmp/options.go
comparercmp/options.go
reportercmp/options.go
sliceSortercmp/cmpopts/sort.go
mapSortercmp/cmpopts/sort.go
unexportedFiltercmp/cmpopts/ignore.go
structFiltercmp/cmpopts/struct_filter.go
xformFiltercmp/cmpopts/xform.go

Calls

no outgoing calls

Tested by

no test coverage detected