Skip to content

v0.3.0

Latest
Compare
Choose a tag to compare
@saurabh0719 saurabh0719 released this 22 Sep 06:13
· 10 commits to main since this release
7935e1c

Jett v0.3.0 -

What's new?

  • New HTML renderer for simple and nested templates
func HTML(w http.ResponseWriter, data interface{}, htmlFiles ...string)
  • Any route handler - Assigns a HandlerFunc to the GET, HEAD, OPTIONS, POST, PUT, PATCH & DELETE method for the given path. It DOES NOT actually match any random arbitrary method method.
func (r *Router) Any(path string, handlerFn http.HandlerFunc, middleware ...func(http.Handler) http.Handler)
  • Middleware returns a slice ([]func(http.Handler) http.Handler) of the middleware stack for the router
func (r *Router) Middleware() []func(http.Handler) http.Handler
  • Heartbeat middleware - Set up an endpoint to conveniently ping your server.

  • Timeout middleware - Timeout is a middleware that cancels context after a given timeout

  • Extensive comments and Go doc coverage

Breaking change -

  • TEXT renderer is now Text - see the docs for more.

Jett's API and design are now seemingly stable, with no immediate requirements planned for the future. We will enter stable mode soon, with the main focus on adding more tests and documentation + PRs from the community.


v0.3.0 is here! 🚀