summaryrefslogtreecommitdiff
path: root/src/pkg/json/struct.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/json/struct.go')
-rw-r--r--src/pkg/json/struct.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/pkg/json/struct.go b/src/pkg/json/struct.go
index 49766bebe..e5b2188f5 100644
--- a/src/pkg/json/struct.go
+++ b/src/pkg/json/struct.go
@@ -19,12 +19,8 @@ type _StructBuilder struct {
var nobuilder *_StructBuilder
func isfloat(v reflect.Value) bool {
- switch v := v.(type) {
- case *reflect.FloatValue:
- return true;
- case *reflect.Float32Value:
- return true;
- case *reflect.Float64Value:
+ switch v.(type) {
+ case *reflect.FloatValue, *reflect.Float32Value, *reflect.Float64Value:
return true;
}
return false;