Similar performs deep check of **logical** equality of two Values Note, Values(nil) and Values{} are not Equal but Similar.
(values2 Values)
| 102 | // |
| 103 | // Note, Values(nil) and Values{} are not Equal but Similar. |
| 104 | func (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 | // |
no test coverage detected