We examine the contract of the list endpoint
GET /api/v1/tasks: why the response is better wrapped in an object
{
"tasks"
:
[...]
}, how to correctly read
query parameters through
url.Values, validate
done/
sort, filter without extra allocations, and make the output deterministic: sort by
ID by default,
Title + tie-break by
ID when
sort=title. In the end, we assemble the handler pipeline
parse → list → filter → sort → encode on
net/http.