You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Body/Form/Query fields must be capital to be public struct members.
"reflect: reflect.Value.SetString using value obtained using unexported field" -
gongular/parser.go:142
type InputHandler struct {
Param struct {
Name string
}
Query struct {
Ref int
}
Form struct {
Title string `valid:"required"`
Email string
Message string `valid:"required"`
}
}
However, it would be nice if lowercase values could be used to conform to modern lowercase request param usage. I've looked through the source code and documentation and I don't see any mention of (my first guess) struct field tags Title string 'name:title' as an option.
How should I be handling this?
The text was updated successfully, but these errors were encountered:
I can say in over 10 years of multiple languages, API's, and platforms I've never, ever had a request where two params were named the same thing (in different cases) and contained different values.
Currently Body/Form/Query fields must be capital to be public struct members.
However, it would be nice if lowercase values could be used to conform to modern lowercase request param usage. I've looked through the source code and documentation and I don't see any mention of (my first guess) struct field tags
Title string 'name:title'
as an option.How should I be handling this?
The text was updated successfully, but these errors were encountered: