From ff89b75eeef30d15d59ac9aeea16af84ec15130c Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Sun, 23 Jan 2022 17:16:13 -0800 Subject: [PATCH] gofmt --- src/reflect/type.go | 1 - src/reflect/value.go | 34 +++++++++++++++++----------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/reflect/type.go b/src/reflect/type.go index 804791e8f6..748fff7eae 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -837,4 +837,3 @@ func align(offset uintptr, alignment uintptr) uintptr { func SliceOf(t Type) Type { panic("unimplemented: reflect.SliceOf()") } - diff --git a/src/reflect/value.go b/src/reflect/value.go index 95fea416b3..2f10ded564 100644 --- a/src/reflect/value.go +++ b/src/reflect/value.go @@ -128,7 +128,7 @@ func (v Value) IsNil() bool { _, val := decomposeInterface(*(*interface{})(v.value)) return val == nil default: - panic(&ValueError{Method: "IsNil"}) + panic(&ValueError{Method: "IsNil"}) } } @@ -144,7 +144,7 @@ func (v Value) Pointer() uintptr { case Func: panic("unimplemented: (reflect.Value).Pointer()") default: // not implemented: Func - panic(&ValueError{Method: "Pointer"}) + panic(&ValueError{Method: "Pointer"}) } } @@ -187,7 +187,7 @@ func (v Value) Bool() bool { return uintptr(v.value) != 0 } default: - panic(&ValueError{Method: "Bool"}) + panic(&ValueError{Method: "Bool"}) } } @@ -224,7 +224,7 @@ func (v Value) Int() int64 { return int64(int64(uintptr(v.value))) } default: - panic(&ValueError{Method: "Int"}) + panic(&ValueError{Method: "Int"}) } } @@ -267,7 +267,7 @@ func (v Value) Uint() uint64 { return uint64(uintptr(v.value)) } default: - panic(&ValueError{Method: "Uint"}) + panic(&ValueError{Method: "Uint"}) } } @@ -293,7 +293,7 @@ func (v Value) Float() float64 { return *(*float64)(unsafe.Pointer(&v.value)) } default: - panic(&ValueError{Method: "Float"}) + panic(&ValueError{Method: "Float"}) } } @@ -315,7 +315,7 @@ func (v Value) Complex() complex128 { // architectures with 128-bit pointers, however. return *(*complex128)(v.value) default: - panic(&ValueError{Method: "Complex"}) + panic(&ValueError{Method: "Complex"}) } } @@ -360,7 +360,7 @@ func (v Value) Len() int { case String: return int((*stringHeader)(v.value).len) default: - panic(&ValueError{Method: "Len"}) + panic(&ValueError{Method: "Len"}) } } @@ -378,7 +378,7 @@ func (v Value) Cap() int { case Slice: return int((*sliceHeader)(v.value).cap) default: - panic(&ValueError{Method: "Cap"}) + panic(&ValueError{Method: "Cap"}) } } @@ -408,7 +408,7 @@ func (v Value) Elem() Value { flags: v.flags &^ valueFlagIndirect, } default: - panic(&ValueError{Method: "Elem"}) + panic(&ValueError{Method: "Elem"}) } } @@ -552,7 +552,7 @@ func (v Value) Index(i int) Value { value: unsafe.Pointer(value), } default: - panic(&ValueError{Method: "Index"}) + panic(&ValueError{Method: "Index"}) } } @@ -631,7 +631,7 @@ func (v Value) SetBool(x bool) { case Bool: *(*bool)(v.value) = x default: - panic(&ValueError{Method: "SetBool"}) + panic(&ValueError{Method: "SetBool"}) } } @@ -649,7 +649,7 @@ func (v Value) SetInt(x int64) { case Int64: *(*int64)(v.value) = x default: - panic(&ValueError{Method: "SetInt"}) + panic(&ValueError{Method: "SetInt"}) } } @@ -669,7 +669,7 @@ func (v Value) SetUint(x uint64) { case Uintptr: *(*uintptr)(v.value) = uintptr(x) default: - panic(&ValueError{Method: "SetUint"}) + panic(&ValueError{Method: "SetUint"}) } } @@ -681,7 +681,7 @@ func (v Value) SetFloat(x float64) { case Float64: *(*float64)(v.value) = x default: - panic(&ValueError{Method: "SetFloat"}) + panic(&ValueError{Method: "SetFloat"}) } } @@ -693,7 +693,7 @@ func (v Value) SetComplex(x complex128) { case Complex128: *(*complex128)(v.value) = x default: - panic(&ValueError{Method: "SetComplex"}) + panic(&ValueError{Method: "SetComplex"}) } } @@ -703,7 +703,7 @@ func (v Value) SetString(x string) { case String: *(*string)(v.value) = x default: - panic(&ValueError{Method: "SetString"}) + panic(&ValueError{Method: "SetString"}) } }