MCPcopy Create free account
hub / github.com/OpenPrinting/goipp / Similar

Method Similar

value.go:104–117  ·  view source on GitHub ↗

Similar performs deep check of **logical** equality of two Values Note, Values(nil) and Values{} are not Equal but Similar.

(values2 Values)

Source from the content-addressed store, hash-verified

102//
103// Note, Values(nil) and Values{} are not Equal but Similar.
104func (values Values) Similar(values2 Values) bool {
105 if len(values) != len(values2) {
106 return false
107 }
108
109 for i, v := range values {
110 v2 := values2[i]
111 if v.T != v2.T || !ValueSimilar(v.V, v2.V) {
112 return false
113 }
114 }
115
116 return true
117}
118
119// Value represents an attribute value
120//

Callers 1

ValueSimilarFunction · 0.45

Calls 1

ValueSimilarFunction · 0.85

Tested by

no test coverage detected