From ea09db929219170d0b311f3ee46c7631696fd2b5 Mon Sep 17 00:00:00 2001 From: joeybloggs Date: Sat, 6 Aug 2016 16:03:45 -0400 Subject: [PATCH] aha! there's the extra allocation(s) Ive been chasing down! --- errors.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/errors.go b/errors.go index 87df6f6..993424a 100644 --- a/errors.go +++ b/errors.go @@ -105,9 +105,9 @@ type FieldError interface { // message Value() interface{} - // returns the param value, already converted into the fields type for - // comparison; this will also help with generating an error message - Param() interface{} + // returns the param value, in string form for comparison; this will also + // help with generating an error message + Param() string // Kind returns the Field's reflect Kind // @@ -135,7 +135,7 @@ type fieldError struct { field string structField string value interface{} - param interface{} + param string kind reflect.Kind typ reflect.Type } @@ -180,9 +180,9 @@ func (fe *fieldError) Value() interface{} { return fe.value } -// Param returns the param value, already converted into the fields type for -// comparison; this will also help with generating an error message -func (fe *fieldError) Param() interface{} { +// Param returns the param value, in string form for comparison; this will +// also help with generating an error message +func (fe *fieldError) Param() string { return fe.param }