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

Method Equal

kv/memberlist/kv.pb.go:210–245  ·  view source on GitHub ↗
(that interface{})

Source from the content-addressed store, hash-verified

208 return true
209}
210func (this *KeyValuePair) Equal(that interface{}) bool {
211 if that == nil {
212 return this == nil
213 }
214
215 that1, ok := that.(*KeyValuePair)
216 if !ok {
217 that2, ok := that.(KeyValuePair)
218 if ok {
219 that1 = &that2
220 } else {
221 return false
222 }
223 }
224 if that1 == nil {
225 return this == nil
226 } else if this == nil {
227 return false
228 }
229 if this.Key != that1.Key {
230 return false
231 }
232 if !bytes.Equal(this.Value, that1.Value) {
233 return false
234 }
235 if this.Codec != that1.Codec {
236 return false
237 }
238 if this.Deleted != that1.Deleted {
239 return false
240 }
241 if this.UpdateTimeMillis != that1.UpdateTimeMillis {
242 return false
243 }
244 return true
245}
246func (this *KeyValueStore) GoString() string {
247 if this == nil {
248 return "nil"

Calls

no outgoing calls