pointer dereferencer
This commit is contained in:
parent
4a82f2c581
commit
38878bfda9
|
@ -13,7 +13,6 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"reflect"
|
||||
"sort"
|
||||
"strings"
|
||||
|
@ -395,6 +394,10 @@ func writeValue(w io.Writer, val reflect.Value) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
for val.Kind() == reflect.Ptr || val.Kind() == reflect.Interface {
|
||||
val = val.Elem()
|
||||
}
|
||||
|
||||
switch v := val; v.Kind() {
|
||||
case reflect.String:
|
||||
s := v.String()
|
||||
|
|
Loading…
Reference in New Issue
Block a user