Documentation ¶
Overview ¶
Package protoreflectcmp provides testing facilites for using the cmp package with protoreflect.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Transform ¶
Transform returns a cmp.Option that will make protoreflect.List instances comparable to slices of proto messages.
The slice type used for comparison should be a slice of some non-interface type. cmp.Equal(<some protoreflect.List instance>, []proto.Message{&mypb.X{}}) will not work, while cmp.Equal(<some protoreflect.List instance>, []*mypb.X{&mypb.X{}}) will.
Types ¶
type Option ¶
type Option struct {
// contains filtered or unexported fields
}
Option configures the Transform function.
func IgnoreElementType ¶
func IgnoreElementType() Option
If specified, ignores differences between the element types of two lists. This may be needed if comparing []proto.Message{} to protoreflect.List.
Click to show internal directories.
Click to hide internal directories.