`` type GetListReq struct { Id stringuri:"id" binding:"required,len=32"Order map[string]stringform:"order"Limit []intform:"limit[]"Title *stringform:"title"Status *int8form:"status"CreatedAt *time.Timeform:"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.