-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
bugIt is confirmed a bug, but don't worry, we'll handle it.It is confirmed a bug, but don't worry, we'll handle it.
Description
What version of Go
and system type/arch are you using?
go version go1.22.0 linux/amd64
What version of GoFrame
are you using?
v2.7.0
Can this bug be re-produced with the latest release?
YES
What did you do?
define a STD router REQ
type NULLStringReq struct {
g.Meta `path:"/test" method:"get" summary:"STRING NULL TESTER"`
ES []string `json:"es" v:"required" `
}
test with this REQs
-
GET /test?es[]=NULL
result inNULLStringReq.ES = []string{"NULL"}
-
GET /test?es=1
result inNULLStringReq.ES = []string{"1"}
-
GET /test?es=NULL
result inNULLStringReq.ES = nil
What did you expect to see?
-
GET /test?es=NULL
result inNULLStringReq.ES = []string{"NULL"}
just like GET /test?es=1
or like the raw method,which is correct
What did you see instead?
Metadata
Metadata
Assignees
Labels
bugIt is confirmed a bug, but don't worry, we'll handle it.It is confirmed a bug, but don't worry, we'll handle it.