docs(httputil): correct tier from 3 to 2
httputil depends on xerrors (Tier 0) and valid (Tier 1), placing it at Tier 2. No infrastructure or lifecycle dependencies exist in this module.
This commit is contained in:
11
doc.go
Normal file
11
doc.go
Normal file
@@ -0,0 +1,11 @@
|
||||
// Package httputil provides typed HTTP handler adapters and response helpers.
|
||||
//
|
||||
// The centrepiece is [Handle], a generics-based adapter that wraps a pure Go
|
||||
// function into an [net/http.HandlerFunc], handling JSON decode, validation,
|
||||
// and error mapping automatically:
|
||||
//
|
||||
// r.Get("/orders/{id}", httputil.Handle(validator, svc.GetOrder))
|
||||
//
|
||||
// Error responses are mapped from [xerrors.Code] to HTTP status codes.
|
||||
// All response helpers set Content-Type: application/json.
|
||||
package httputil
|
||||
Reference in New Issue
Block a user