From dcb9614dfec3c8dcaaa47e9fa516528fdc47279b Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 20 Mar 2015 11:48:40 +0100 Subject: [PATCH] common: drop unused kind field from Value This makes Value 24 bytes smaller on 64bit systems. --- common/value.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/common/value.go b/common/value.go index f6150cb82..722e641b5 100644 --- a/common/value.go +++ b/common/value.go @@ -26,10 +26,7 @@ import ( // Value is useful whenever you feel that Go's types limit your // ability to express yourself. In these situations, use Value and // forget about this strong typing nonsense. -type Value struct { - Val interface{} - kind reflect.Value -} +type Value struct{ Val interface{} } func (val *Value) String() string { return fmt.Sprintf("%x", val.Val) @@ -53,7 +50,6 @@ func (val *Value) IsNil() bool { } func (val *Value) Len() int { - //return val.kind.Len() if data, ok := val.Val.([]interface{}); ok { return len(data) }