``
type GetListReq struct {
Id string
uri:"id" binding:"required,len=32"Order map[string]string
form:"order"Limit []int
form:"limit[]"Title *string
form:"title"Status *int8
form:"status"CreatedAt *time.Time
form:"created_at"`
}
bind to struct
Comment From: agg-yash
Hey 👋 You can’t get both URI params and query/form values in one ShouldBind call , each binder only looks at one source. The usual approach is to call two different binders on the same struct: one for the URI (e.g. ShouldBindUri) and another for the query/form (e.g. ShouldBindQuery). That way the id comes from the path and the rest of the fields come from the query string.
So you can keep one struct, but you need to call the appropriate binders separately.