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

Method Equal

httpgrpc/httpgrpc.pb.go:314–345  ·  view source on GitHub ↗
(that interface{})

Source from the content-addressed store, hash-verified

312 return true
313}
314func (this *Header) Equal(that interface{}) bool {
315 if that == nil {
316 return this == nil
317 }
318
319 that1, ok := that.(*Header)
320 if !ok {
321 that2, ok := that.(Header)
322 if ok {
323 that1 = &that2
324 } else {
325 return false
326 }
327 }
328 if that1 == nil {
329 return this == nil
330 } else if this == nil {
331 return false
332 }
333 if this.Key != that1.Key {
334 return false
335 }
336 if len(this.Values) != len(that1.Values) {
337 return false
338 }
339 for i := range this.Values {
340 if this.Values[i] != that1.Values[i] {
341 return false
342 }
343 }
344 return true
345}
346func (this *HTTPRequest) GoString() string {
347 if this == nil {
348 return "nil"

Callers 15

EqualMethod · 0.45
EqualMethod · 0.45
TestToHeaderFunction · 0.45
TestErrorfFunction · 0.45
TestBasicFunction · 0.45
TestErrorFunction · 0.45
checkHTTPResponseFunction · 0.45
TestParseURLFunction · 0.45
TestTracePropagationFunction · 0.45

Calls

no outgoing calls

Tested by 14

TestToHeaderFunction · 0.36
TestErrorfFunction · 0.36
TestBasicFunction · 0.36
TestErrorFunction · 0.36
checkHTTPResponseFunction · 0.36
TestParseURLFunction · 0.36
TestTracePropagationFunction · 0.36