Fix a comment and a apply few gofmt changes.
This commit is contained in:
parent
34805dbdb5
commit
c5fba05307
|
@ -102,7 +102,7 @@ var (
|
||||||
// hexDigits is used to map a decimal value to a hex digit.
|
// hexDigits is used to map a decimal value to a hex digit.
|
||||||
var hexDigits = "0123456789abcdef"
|
var hexDigits = "0123456789abcdef"
|
||||||
|
|
||||||
// unpackValue returns values inside of non-nil inteferfaces when possible.
|
// unpackValue returns values inside of non-nil interfaces when possible.
|
||||||
// This is useful for data types like structs, arrays, slices, and maps which
|
// This is useful for data types like structs, arrays, slices, and maps which
|
||||||
// can contain varying types packed inside an interface.
|
// can contain varying types packed inside an interface.
|
||||||
func unpackValue(v reflect.Value) reflect.Value {
|
func unpackValue(v reflect.Value) reflect.Value {
|
||||||
|
|
|
@ -632,7 +632,7 @@ func addFuncDumpTests() {
|
||||||
var v3 = func(i int, s string) (b bool, err error) {
|
var v3 = func(i int, s string) (b bool, err error) {
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
nv3 := (*func(int, string)(bool, error))(nil)
|
nv3 := (*func(int, string) (bool, error))(nil)
|
||||||
pv3 := &v3
|
pv3 := &v3
|
||||||
v3Addr := fmt.Sprintf("%p", pv3)
|
v3Addr := fmt.Sprintf("%p", pv3)
|
||||||
pv3Addr := fmt.Sprintf("%p", &pv3)
|
pv3Addr := fmt.Sprintf("%p", &pv3)
|
||||||
|
|
|
@ -160,7 +160,7 @@ func ExampleSpewState_Dump() {
|
||||||
// example.
|
// example.
|
||||||
|
|
||||||
// A SpewState does not need initialization.
|
// A SpewState does not need initialization.
|
||||||
ss := new(spew.SpewState) // or var ss spew.SpewState
|
ss := new(spew.SpewState) // or var ss spew.SpewState
|
||||||
ss2 := new(spew.SpewState) // or var ss2 spew.SpewState
|
ss2 := new(spew.SpewState) // or var ss2 spew.SpewState
|
||||||
|
|
||||||
// Modify the indent level of the first SpewState only.
|
// Modify the indent level of the first SpewState only.
|
||||||
|
@ -204,7 +204,7 @@ func ExampleSpewState_Printf() {
|
||||||
// example.
|
// example.
|
||||||
|
|
||||||
// A SpewState does not need initialization.
|
// A SpewState does not need initialization.
|
||||||
ss := new(spew.SpewState) // or var ss spew.SpewState
|
ss := new(spew.SpewState) // or var ss spew.SpewState
|
||||||
ss2 := new(spew.SpewState) // or var ss2 spew.SpewState
|
ss2 := new(spew.SpewState) // or var ss2 spew.SpewState
|
||||||
|
|
||||||
// Modify the method handling of the first SpewState only.
|
// Modify the method handling of the first SpewState only.
|
||||||
|
|
|
@ -123,7 +123,7 @@ func convertArgs(args []interface{}) (formatters []interface{}) {
|
||||||
// just declaring a SpewState variable, is sufficient to initialilize a
|
// just declaring a SpewState variable, is sufficient to initialilize a
|
||||||
// SpewState using the default configuration options.
|
// SpewState using the default configuration options.
|
||||||
type SpewState struct {
|
type SpewState struct {
|
||||||
cs *ConfigState
|
cs *ConfigState
|
||||||
}
|
}
|
||||||
|
|
||||||
// Config returns a pointer to the active ConfigState for the SpewState
|
// Config returns a pointer to the active ConfigState for the SpewState
|
||||||
|
|
Loading…
Reference in New Issue