Skip to content

Assign to Underlying Type#6

Open
IamFaizanKhalid wants to merge 2 commits intohetiansu5:masterfrom
IamFaizanKhalid:master
Open

Assign to Underlying Type#6
IamFaizanKhalid wants to merge 2 commits intohetiansu5:masterfrom
IamFaizanKhalid:master

Conversation

@IamFaizanKhalid
Copy link

Fixed the issue where data was not assignable to the underlying type.

For example:

type CustomType int

type MyStruct struct {
  Value CustomType `query:"val"`
}

Unmarshalling to this will panic with:

reflect.Set: value of type int is not assignable to type CustomType

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant