Releases: go-chi/chi
Releases · go-chi/chi
v3.3.3
Minor release.
Changelog: v3.3.2...v3.3.3
v3.3.2
v3.3.1
v3.3.0
- New
chi.RegisterMethod(method)
to add support for custom HTTP methods, see _examples/custom-method for usage - Deprecated LINK and UNLINK methods from the default list, please use
chi.RegisterMethod("LINK")
andchi.RegisterMethod("UNLINK")
in aninit()
function
Router tree Walker, an analogy to filepath.Walk
func Walk(r Routes, walkFn WalkFunc) error
type WalkFunc func(method string, route string, handler http.Handler, middlewares ...func(http.Handler) http.Handler) error
v3.1.0
- Fix a few minor issues after v3 release
- Move
docgen
sub-pkg to https://github.com/go-chi/docgen - Move
render
sub-pkg to https://github.com/go-chi/render - Add new
URLFormat
handler to chi/middleware sub-pkg to make working with url mime
suffixes easier, ie. parsing/articles/1.json
and/articles/1.xml
. See comments in
https://github.com/go-chi/chi/blob/master/middleware/url_format.go for example usage.
v3.0.0
- Major update to chi library with many exciting updates, but also some breaking changes
- URL parameter syntax changed from
/:id
to/{id}
for even more flexible routing, such as/articles/{month}-{day}-{year}-{slug}
,/articles/{id}
, and/articles/{id}.{ext}
on the same router - Support for regexp for routing patterns, in the form of
/{paramKey:regExp}
for example:r.Get("/articles/{name:[a-z]+}", h)
andchi.URLParam(r, "name")
- Add
Method
andMethodFunc
tochi.Router
to allow routing definitions such asr.Method("GET", "/", h)
which provides a cleaner interface for custom handlers like in_examples/custom-handler
- Deprecating
mux#FileServer
helper function. Instead, we encourage users to create their own using file handler with the stdlib, see_examples/fileserver
for an example - Add support for LINK/UNLINK http methods via
r.Method()
andr.MethodFunc()
- Moved the chi project to its own organization, to allow chi-related community packages to be easily discovered and supported, at: https://github.com/go-chi
- NOTE: please update your import paths to
"github.com/go-chi/chi"
- NOTE: chi v2 is still available at https://github.com/go-chi/chi/tree/v2
v2.1.0
- Minor improvements and update to the chi core library
- Introduced a brand new
chi/render
sub-package to complete the story of building
APIs to offer a pattern for managing well-defined request / response payloads. Please
check out the updated_examples/rest
example for how it works. - Added
MethodNotAllowed(h http.HandlerFunc)
to chi.Router interface
v2.0.0
- After many months of v2 being in an RC state with many companies and users running it in
production, the inclusion of some improvements to the middlewares, we are very pleased to
announce v2.0.0 of chi. This release is ready for HTTP2 and supports go1.8's introduction of
http.Pusher for HTTP2.
v0.9.0 (2016-03-31)
- Reuse context objects via sync.Pool for zero-allocation routing #33
- BREAKING NOTE: due to subtle API changes, previously
chi.URLParams(ctx)["id"]
used to access url parameters
has changed to:chi.URLParam(ctx, "id")