Documentation ¶
Overview ¶
Package registry provides a way to register options to cmp.Diff.
This is known to be used by:
- go.chromium.org/luci/testing/truth/should.{Resemble,Match}
- go.chromium.org/luci/testing/typed.{Diff,Got}
By default this includes:
- "google.golang.org/protobuf/testing/protocmp".Transform()
- A direct comparison of protoreflect.Descriptor types. These are documented as being comparable with `==`, but by default `cmp` will recurse into their guts.
- A direct comparison of reflect.Type interfaces.
- Functions will compare by their function pointer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCmpOptions ¶
GetCmpOptions gets a copy of the registry at the time it was called.
func RegisterCmpOption ¶
RegisterCmpOption registers an option to the registry.
RegisterCmpOption will panic if the option is nil. This function does not check for duplicate options because I don't have a good way to do that.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.