Use all fields from embedded structs when decoding the HTTP request.
type Sort struct {
Name string
Asc bool
}
func (s *Sort) UnmarshalText(text []byte) error {}
type Range struct {
Start int `query:"rangeStart"`
End int `query:"rangeEnd"`
}
var req struct {
Sort
Range
}
// ?sort=name&rangeStart=0&rangeEnd=
Decode(r, &req)
Use all fields from embedded structs when decoding the HTTP request.