Skip to content

Commit

Permalink
sport radar
Browse files Browse the repository at this point in the history
  • Loading branch information
iesreza committed Mar 6, 2024
1 parent 8771546 commit 635fc0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/generic/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ func (v Value) PropByTag(tag string) Value {

func (v Value) SetProp(property string, value any) error {
ref := v.Indirect()
if ref.Kind() == reflect.Invalid {
return nil
}

if ref.Kind() == reflect.Struct {
if ref.Type() == reflect.TypeOf(time.Time{}) {
Expand All @@ -428,6 +431,7 @@ func (v Value) SetProp(property string, value any) error {
return nil
}
//var x = ref.FieldByName(property).Interface()

var field = ref.FieldByName(property)
if field.Kind() == reflect.Struct {
return Value{Input: field.Addr().Interface()}.SetProp(property, value)
Expand Down Expand Up @@ -466,7 +470,6 @@ func (v Value) Cast(dst any) error {
for ref.Kind() == reflect.Ptr {
ref = ref.Elem()
}

var kind = ref.Kind()
if kind == reflect.Struct {
x := Parse(dst)
Expand Down

0 comments on commit 635fc0a

Please sign in to comment.