Pointer -> Ptr (#2458)

This commit is contained in:
Chandra Eepuri 2023-02-24 11:17:58 +05:30 committed by GitHub
parent 6045d2e456
commit 6ec458549e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ func (s StructValue) Scan(key string, value string) error {
}
v := s.value.Field(field.index)
isPtr := v.Kind() == reflect.Pointer
isPtr := v.Kind() == reflect.Ptr
if isPtr && v.IsNil() {
v.Set(reflect.New(v.Type().Elem()))