mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-10 10:53:36 +02:00
fix forward auth attempt#1
This commit is contained in:
@@ -277,6 +277,16 @@ func Convert(src reflect.Value, dst reflect.Value) E.NestedError {
|
||||
|
||||
func ConvertString(src string, dst reflect.Value) (convertible bool, convErr E.NestedError) {
|
||||
convertible = true
|
||||
if dst.Kind() == reflect.Ptr {
|
||||
if dst.IsNil() {
|
||||
dst.Set(reflect.New(dst.Type().Elem()))
|
||||
}
|
||||
dst = dst.Elem()
|
||||
}
|
||||
if dst.Kind() == reflect.String {
|
||||
dst.SetString(src)
|
||||
return
|
||||
}
|
||||
// primitive types / simple types
|
||||
switch dst.Kind() {
|
||||
case reflect.Bool:
|
||||
|
||||
Reference in New Issue
Block a user