We are launching all new Klivolks 3.0See what is new

Request & response

Every generated handler method decodes into its Request struct via one request package call, and writes its result via the response package — kept consistent by construction, not convention.

DECODE

request package

DecodeQuery for GET (always query-params-only). Otherwise whichever of DecodeJSON/DecodeForm/DecodeMultipart matches -body. A route with {name} path segments also gets a DecodePath call, matched by the same json tag as every other source.

RESPOND

response package

response.JSON(w, status, v) → {"data": v}. response.Error(w, r, status, msg) → {"error": msg}, and on a -db app auto-logs every 5xx to the core database, best-effort. response.JSONRaw skips the envelope; response.HTML renders an editable template.

Handlers only decode-then-respond; the actual service call is left as a // TODO: call <pkg>'s service with req comment — wiring it in is a deliberate, separate step you do by hand.