Releases: labstack/echo
Releases · labstack/echo
v1.3
Echo v1.3
- Support for
golang.org/x/net/context - Logging with option to set prefix, output and levels.
Echo#SetLogPrefix()Echo#SetLogOutput()Echo#SetLogLevel()
Echo#HookRegisters a callback to alter request/response objects even before it hits the router or any middleware.Echo#Hook()
Echo#AutoIndex()- Enables/disables automatically creating an index page for the directory.Context#Path()- Returns the registered path for a handler, it can be used in the middleware for logging purpose.Context#JSONIndent()- JSON response with indentation.Context#XMLIndent- XML response with indentation.Context#Echo()- Returns theEchoinstance.- Dropped API
Echo#StripTrailingSlash()- UseEcho#Hook()
- Refactored API
Context#String()- Dropped Printf, an option argument.Context#HTML()- Dropped Printf, an optional argument.
- Recipes
- Community Packages
- Updated docs
- Closed many PRs and issues (v1.2.0...v1.3).
v1.2.0
- New API
Echo.Any- Any adds a route > handler to the router for all HTTP methods.Echo.Match- Match adds a route > handler to the router for multiple HTTP methods provided.Response.Committed- Getter function for committed status.Context.File- Sends response as file with option to download as attachment.Context.JSONP- JSONP sends a JSONP response with status code. It usescallbackto construct the JSONP payload.
- Dropped API
RedirectToSlashmiddleware
- Refactored API
Echo.DebugEcho.SetDebugStripTrailingSlashmiddleware moved toEcho.StripTrailingSlash
- Enhancements
- Added
sync.Poolto gzip middleware #200 - Print IP address in logger middleware #212
- Moved examples to recipes
- Added new recipes
- Google App Engine
- New website
- Updated docs
- Added
- Closed the following issues
v1.1.0
- New APIs
Echo.Server- Returns the internal *http.ServerContext.Query- Read query paramContext.Form- Read form paramContext.XML- Sends an application/xml responseEcho.ColoredLog- Enable/Disable colored log
Context.Bindnow supports XML- Removed JWT middleware library
- Issues fixed
- Recipes
Production ready
Group separated from Echo
- Better handling for WebSocket in middleware
- Separated Group from Echo to limit API
- Updated docs
Encapsulation
Encapsulated Context's fields and exposed them via public functions.
Echo.HandlerFunc changed
Echo.HandlerFunc changed from func (*Context) *HTTPError to func (*Context) error
Smashing new features
- Added following middleware
- Panic recover
- Basic auth
- Strip trailing slash
- Redirect to slash
- Gzip
- Support to serve favicon
- Enhanced priority in router
- Wrapped
Flush,HijackandCloseNotifyfunctions in response. - Fixed issues: #51, #53, #57, #63, #65, #67, #68
- Dropped
NotFoundHandlerin favor ofHTTPErrorHandler
Centralized HTTP error handling
- Centralized HTTP error handling http://labstack.github.io/echo/guide/#error-handling
- Default handler function changed from
func(*Context) errortofunc(*Context) *echo.HTTPError. - Most of the response helper functions now return
*echo.HTTPErrorhttp://labstack.github.io/echo/guide/#response
- Default handler function changed from
- Fixed issues #46, #49 and #50.
- Added
echo.HandlerFuncto the list of supported handlers. - More documentation.