aha! there's the extra allocation(s) Ive been chasing down!
joeybloggs
7 years ago
104 | 104 | // message |
105 | 105 | Value() interface{} |
106 | 106 | |
107 | // returns the param value, already converted into the fields type for | |
108 | // comparison; this will also help with generating an error message | |
109 | Param() interface{} | |
107 | // returns the param value, in string form for comparison; this will also | |
108 | // help with generating an error message | |
109 | Param() string | |
110 | 110 | |
111 | 111 | // Kind returns the Field's reflect Kind |
112 | 112 | // |
134 | 134 | field string |
135 | 135 | structField string |
136 | 136 | value interface{} |
137 | param interface{} | |
137 | param string | |
138 | 138 | kind reflect.Kind |
139 | 139 | typ reflect.Type |
140 | 140 | } |
179 | 179 | return fe.value |
180 | 180 | } |
181 | 181 | |
182 | // Param returns the param value, already converted into the fields type for | |
183 | // comparison; this will also help with generating an error message | |
184 | func (fe *fieldError) Param() interface{} { | |
182 | // Param returns the param value, in string form for comparison; this will | |
183 | // also help with generating an error message | |
184 | func (fe *fieldError) Param() string { | |
185 | 185 | return fe.param |
186 | 186 | } |
187 | 187 |