github.com/hedzr/evendeep@v0.4.8/diff/comparer.go (about) 1 package diff 2 3 import ( 4 "reflect" 5 6 "github.com/hedzr/evendeep/typ" 7 ) 8 9 // Comparer interface. 10 type Comparer interface { 11 Match(typ reflect.Type) bool 12 Equal(ctx Context, lhs, rhs reflect.Value, path Path) (equal bool) 13 } 14 15 // Context interface. 16 type Context interface { 17 PutAdded(k string, v typ.Any) 18 PutRemoved(k string, v typ.Any) 19 PutModified(k string, v Update) 20 PutPath(path Path, parts ...PathPart) string 21 }