mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-03-09 22:13:27 +00:00
testing/protocmp: surface comment about unused Transform options
Change-Id: I83bdb0f3f937f745b5758c282e1bd58203a8c784 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/237221 Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
parent
7e8b902d03
commit
596bfbf068
@ -157,10 +157,10 @@ type option struct{}
|
||||
// This does not directly transform higher-order composite Go types.
|
||||
// For example, []*foopb.Message is not transformed into []Message,
|
||||
// but rather the individual message elements of the slice are transformed.
|
||||
//
|
||||
// Note that there are currently no custom options for Transform,
|
||||
// but the use of an unexported type keeps the future open.
|
||||
func Transform(...option) cmp.Option {
|
||||
// NOTE: There are currently no custom options for Transform,
|
||||
// but the use of an unexported type keeps the future open.
|
||||
|
||||
// addrType returns a pointer to t if t isn't a pointer or interface.
|
||||
addrType := func(t reflect.Type) reflect.Type {
|
||||
if k := t.Kind(); k == reflect.Interface || k == reflect.Ptr {
|
||||
|
Loading…
x
Reference in New Issue
Block a user