MCPcopy
hub / github.com/TomWright/dasel / Equal

Method Equal

model/orderedmap/map.go:46–62  ·  view source on GitHub ↗
(other *Map)

Source from the content-addressed store, hash-verified

44}
45
46func (m *Map) Equal(other *Map) bool {
47 if m.Len() != other.Len() {
48 return false
49 }
50
51 for i, k := range m.keys {
52 if k != other.keys[i] {
53 return false
54 }
55
56 if !reflect.DeepEqual(m.data[k], other.data[k]) {
57 return false
58 }
59 }
60
61 return true
62}
63
64// Get returns the value found under the given key.
65func (m *Map) Get(key string) (any, bool) {

Callers 15

TestEqualFunction · 0.95
runMethod · 0.45
TestSelectFunction · 0.45
TestTernaryFunction · 0.45
TestValue_EqualFunction · 0.45
runMethod · 0.45
TestTomlWriter_MoreCasesFunction · 0.45
TestTomlWriter_CompactFunction · 0.45
tomlReaderTestFunction · 0.45
runMethod · 0.45

Calls 1

LenMethod · 0.95

Tested by 15

TestEqualFunction · 0.76
runMethod · 0.36
TestSelectFunction · 0.36
TestTernaryFunction · 0.36
TestValue_EqualFunction · 0.36
runMethod · 0.36
TestTomlWriter_MoreCasesFunction · 0.36
TestTomlWriter_CompactFunction · 0.36
tomlReaderTestFunction · 0.36
runMethod · 0.36