Skip to content

Releases: go-chi/chi

v4.0.1

21 Jan 17:12
Compare
Choose a tag to compare

Fixes issue with compress middleware: #382 #385

v4.0.0

10 Jan 18:42
Compare
Choose a tag to compare
  • chi v4 requires Go 1.10.3+ (or Go 1.9.7+) - we have deprecated support for Go 1.7 and 1.8
  • router: respond with 404 on router with no routes (#362)
  • router: additional check to ensure wildcard is at the end of a url pattern (#333)
  • middleware: deprecate use of http.CloseNotifier (#347)
  • middleware: fix RedirectSlashes to include query params on redirect (#334)
  • History of changes: see v3.3.4...v4.0.0

v3.3.4

08 Jan 01:25
Compare
Choose a tag to compare

Minor middleware improvements. No changes to core library/router. Moving v3 into its own branch as a version of chi for Go 1.7, 1.8, 1.9, 1.10, 1.11

History of changes: v3.3.3...v3.3.4

Master will switch into v4, where we will only support Go versions inline with Go's own policy, https://golang.org/doc/devel/release.html#policy (aka, last 2 versions)

v3.3.3

27 Aug 21:00
Compare
Choose a tag to compare

Minor release.
Changelog: v3.3.2...v3.3.3

v3.3.2

22 Dec 16:12
Compare
Choose a tag to compare
  • Support to route trailing slashes on mounted sub-routers (#281)
  • middleware: new ContentCharset to check matching charsets. Thank you @csucu for your community contribution!

v3.3.1

20 Nov 15:19
Compare
Choose a tag to compare
  • middleware: new AllowContentType handler for explicit whitelist of accepted request Content-Types
  • middleware: new SetHeader handler for short-hand middleware to set a response header key/value
  • Minor bug fixes

v3.3.0

10 Oct 22:12
Compare
Choose a tag to compare
  • 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") and chi.RegisterMethod("UNLINK") in an init() function

Router tree Walker, an analogy to filepath.Walk

25 Jul 18:00
Compare
Choose a tag to compare
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

10 Jul 19:26
Compare
Choose a tag to compare

v3.0.0

23 Jun 14:40
Compare
Choose a tag to compare
  • 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) and chi.URLParam(r, "name")
  • Add Method and MethodFunc to chi.Router to allow routing definitions such as r.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() and r.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