diff options
author | Russ Cox <rsc@golang.org> | 2009-09-09 00:18:16 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-09-09 00:18:16 -0700 |
commit | 261d2e7ed97db73c9fab35872d3f3d831d055b9b (patch) | |
tree | ffd2121150600915ebbe603c05cf97e7ad906f41 /src/pkg/json | |
parent | 9f7e44163241877d8a9df05f03481e066c313579 (diff) | |
download | golang-261d2e7ed97db73c9fab35872d3f3d831d055b9b.tar.gz |
update type switch to match spec.
R=ken
OCL=34471
CL=34471
Diffstat (limited to 'src/pkg/json')
-rw-r--r-- | src/pkg/json/struct.go | 8 |
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; |