Skip to content

Commit b64631b

Browse files
committed
return pointer version of string
1 parent ba50252 commit b64631b

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

nullify.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,7 @@ func ptr(t reflect.Type, cfg config) reflect.Type {
131131
return reflect.PointerTo(reflect.StructOf(structFields))
132132
case reflect.Array:
133133
if cfg.bytesAsString && (t.Elem().Kind() == reflect.Uint8 || (t.Elem().Kind() == reflect.Pointer && t.Elem().Elem().Kind() == reflect.Uint8)) {
134-
elemType := reflect.TypeOf("")
135-
if cfg.nullifyArrayElem {
136-
elemType = reflect.PointerTo(elemType)
137-
}
134+
elemType := reflect.PointerTo(reflect.TypeOf(""))
138135
return elemType
139136
}
140137

0 commit comments

Comments
 (0)