mirror of
https://gitee.com/johng/gf.git
synced 2024-11-30 03:07:45 +08:00
parent
66d0663dc5
commit
d788b7ff5e
@ -108,13 +108,13 @@ func doDump(value interface{}, indent string, buffer *bytes.Buffer, option doDum
|
||||
} else {
|
||||
reflectValue = reflect.ValueOf(value)
|
||||
}
|
||||
var reflectKind = reflectValue.Kind()
|
||||
// Double check nil value.
|
||||
if value == nil {
|
||||
if value == nil || reflectKind == reflect.Invalid {
|
||||
buffer.WriteString(`<nil>`)
|
||||
return
|
||||
}
|
||||
var (
|
||||
reflectKind = reflectValue.Kind()
|
||||
reflectTypeName = reflectValue.Type().String()
|
||||
ptrAddress string
|
||||
newIndent = indent + dumpIndent
|
||||
|
Loading…
Reference in New Issue
Block a user