MCPcopy
hub / github.com/expr-lang/expr / Equal

Method Equal

types/types.go:121–138  ·  view source on GitHub ↗
(t Type)

Source from the content-addressed store, hash-verified

119}
120
121func (m Map) Equal(t Type) bool {
122 if t == Any {
123 return true
124 }
125 mt, ok := t.(Map)
126 if !ok {
127 return false
128 }
129 if len(m) != len(mt) {
130 return false
131 }
132 for k, v := range m {
133 if !v.Equal(mt[k]) {
134 return false
135 }
136 }
137 return true
138}
139
140func (m Map) String() string {
141 pairs := make([]string, 0, len(m))

Callers

nothing calls this directly

Calls 1

EqualMethod · 0.65

Tested by

no test coverage detected