Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleconroy committed Feb 2, 2022
1 parent e1403c4 commit ff89b75
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/reflect/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -837,4 +837,3 @@ func align(offset uintptr, alignment uintptr) uintptr {
func SliceOf(t Type) Type {
panic("unimplemented: reflect.SliceOf()")
}

34 changes: 17 additions & 17 deletions src/reflect/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"})
}
}

Expand All @@ -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"})
}
}

Expand Down Expand Up @@ -187,7 +187,7 @@ func (v Value) Bool() bool {
return uintptr(v.value) != 0
}
default:
panic(&ValueError{Method: "Bool"})
panic(&ValueError{Method: "Bool"})
}
}

Expand Down Expand Up @@ -224,7 +224,7 @@ func (v Value) Int() int64 {
return int64(int64(uintptr(v.value)))
}
default:
panic(&ValueError{Method: "Int"})
panic(&ValueError{Method: "Int"})
}
}

Expand Down Expand Up @@ -267,7 +267,7 @@ func (v Value) Uint() uint64 {
return uint64(uintptr(v.value))
}
default:
panic(&ValueError{Method: "Uint"})
panic(&ValueError{Method: "Uint"})
}
}

Expand All @@ -293,7 +293,7 @@ func (v Value) Float() float64 {
return *(*float64)(unsafe.Pointer(&v.value))
}
default:
panic(&ValueError{Method: "Float"})
panic(&ValueError{Method: "Float"})
}
}

Expand All @@ -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"})
}
}

Expand Down Expand Up @@ -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"})
}
}

Expand All @@ -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"})
}
}

Expand Down Expand Up @@ -408,7 +408,7 @@ func (v Value) Elem() Value {
flags: v.flags &^ valueFlagIndirect,
}
default:
panic(&ValueError{Method: "Elem"})
panic(&ValueError{Method: "Elem"})
}
}

Expand Down Expand Up @@ -552,7 +552,7 @@ func (v Value) Index(i int) Value {
value: unsafe.Pointer(value),
}
default:
panic(&ValueError{Method: "Index"})
panic(&ValueError{Method: "Index"})
}
}

Expand Down Expand Up @@ -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"})
}
}

Expand All @@ -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"})
}
}

Expand All @@ -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"})
}
}

Expand All @@ -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"})
}
}

Expand All @@ -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"})
}
}

Expand All @@ -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"})
}
}

Expand Down

0 comments on commit ff89b75

Please sign in to comment.