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

Method tryOptions

cmp/compare.go:303–310  ·  cmp/compare.go::state.tryOptions
(t reflect.Type, vx, vy reflect.Value)

Source from the content-addressed store, hash-verified

301}
302
303func (s *state) tryOptions(t reflect.Type, vx, vy reflect.Value) bool {
304 // Evaluate all filters and apply the remaining options.
305 if opt := s.opts.filter(s, t, vx, vy); opt != nil {
306 opt.apply(s, vx, vy)
307 return true
308 }
309 return false
310}
311
312func (s *state) tryMethod(t reflect.Type, vx, vy reflect.Value) bool {
313 // Check if this type even has an Equal method.

Callers 1

compareAnyMethod · 0.95

Calls 2

filterMethod · 0.65
applyMethod · 0.65

Tested by

no test coverage detected