updated dependencies and go
This commit is contained in:
@@ -20,11 +20,11 @@ func (pss PrimitiveStringSerializer) ValueToString(v any) (string, error) {
|
||||
|
||||
inType := reflect.TypeOf(v)
|
||||
|
||||
if inType.Kind() == reflect.Ptr && langext.IsNil(v) {
|
||||
if inType.Kind() == reflect.Pointer && langext.IsNil(v) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
if inType.Kind() == reflect.Ptr {
|
||||
if inType.Kind() == reflect.Pointer {
|
||||
rval1 := reflect.ValueOf(v)
|
||||
rval2 := rval1.Elem()
|
||||
rval3 := rval2.Interface()
|
||||
@@ -46,7 +46,7 @@ func (pss PrimitiveStringSerializer) ValueToString(v any) (string, error) {
|
||||
|
||||
func (pss PrimitiveStringSerializer) ValueFromString(str string, outType reflect.Type) (any, error) {
|
||||
|
||||
if outType.Kind() == reflect.Ptr && str == "" {
|
||||
if outType.Kind() == reflect.Pointer && str == "" {
|
||||
return reflect.Zero(outType).Interface(), nil // = nil.(outType), nil
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ func (pss PrimitiveStringSerializer) ValueFromString(str string, outType reflect
|
||||
return reflect.Zero(outType).Interface(), nil // = <default>(outType), nil
|
||||
}
|
||||
|
||||
if outType.Kind() == reflect.Ptr {
|
||||
if outType.Kind() == reflect.Pointer {
|
||||
|
||||
innerValue, err := pss.ValueFromString(str, outType.Elem())
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user