MCPcopy
hub / github.com/grafana/dskit / Equal

Method Equal

middleware/middleware_test/echo_server.pb.go:97–120  ·  view source on GitHub ↗
(that interface{})

Source from the content-addressed store, hash-verified

95}
96
97func (this *Msg) Equal(that interface{}) bool {
98 if that == nil {
99 return this == nil
100 }
101
102 that1, ok := that.(*Msg)
103 if !ok {
104 that2, ok := that.(Msg)
105 if ok {
106 that1 = &that2
107 } else {
108 return false
109 }
110 }
111 if that1 == nil {
112 return this == nil
113 } else if this == nil {
114 return false
115 }
116 if !bytes.Equal(this.Body, that1.Body) {
117 return false
118 }
119 return true
120}
121func (this *Msg) GoString() string {
122 if this == nil {
123 return "nil"

Calls

no outgoing calls