mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-10 16:30:01 +08:00
This commit is contained in:
@@ -748,7 +748,15 @@ func (u *Unmarshaler) processFieldTextUnmarshaler(fieldType reflect.Type, value
|
||||
return true, tval.UnmarshalText(mv)
|
||||
}
|
||||
}
|
||||
|
||||
//[]byte
|
||||
if fieldType.Kind() == reflect.Slice && fieldType.Elem().Kind() == reflect.Uint8 {
|
||||
b, err := base64.StdEncoding.DecodeString(mapValue.(string))
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
value.SetBytes(b)
|
||||
return true, nil
|
||||
}
|
||||
return false, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user