Open
Description
Go version
go version go1.23.2 windows/amd64
GoFrame version
2.9.0
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
Initial web project with the latest version and modify the HelloReq
to :
type HelloReq struct {
g.Meta `path:"/hello" tags:"Project" method:"get" sum:"List all projects"`
Token string `json:"Authorization" des:"JWT" in:"header"`
Owned bool `json:"owned" in:"query" default:"false"`
Deleted bool `json:"deleted" in:"query" default:"false"`
}
Send the request and dump req in controller
curl --location 'http://localhost:8000/hello?deleted=false' \
--header 'Authorization: 1'
What did you see happen?
The dump info would show:
{
Token: "1",
Owned: true,
Deleted: false,
}
What did you expect to see?
In the previous version (2.8.3), it was:
{
Token: "1",
Owned: false,
Deleted: false,
}
Or if you move the Token to the end of the structure, it would also have the right dump:
{
Owned: false,
Deleted: false,
Token: "1",
}
Seems some changes was made with the param parse? Haven't locate the bug yet, may be gconv related