High performance, minimalist Go web framework

Overview

Sourcegraph GoDoc Go Report Card Build Status Codecov Join the chat at https://gitter.im/labstack/echo Forum Twitter License

Supported Go versions

As of version 4.0.0, Echo is available as a Go module. Therefore a Go version capable of understanding /vN suffixed imports is required:

  • 1.9.7+
  • 1.10.3+
  • 1.14+

Any of these versions will allow you to import Echo as github.com/labstack/echo/v4 which is the recommended way of using Echo going forward.

For older versions, please use the latest v3 tag.

Feature Overview

  • Optimized HTTP router which smartly prioritize routes
  • Build robust and scalable RESTful APIs
  • Group APIs
  • Extensible middleware framework
  • Define middleware at root, group or route level
  • Data binding for JSON, XML and form payload
  • Handy functions to send variety of HTTP responses
  • Centralized HTTP error handling
  • Template rendering with any template engine
  • Define your format for the logger
  • Highly customizable
  • Automatic TLS via Let’s Encrypt
  • HTTP/2 support

Benchmarks

Date: 2020/11/11
Source: https://github.com/vishr/web-framework-benchmark
Lower is better!

The benchmarks above were run on an Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz

Guide

Installation

// go get github.com/labstack/echo/{version}
go get github.com/labstack/echo/v4

Example

package main

import (
  "net/http"
  "github.com/labstack/echo/v4"
  "github.com/labstack/echo/v4/middleware"
)

func main() {
  // Echo instance
  e := echo.New()

  // Middleware
  e.Use(middleware.Logger())
  e.Use(middleware.Recover())

  // Routes
  e.GET("/", hello)

  // Start server
  e.Logger.Fatal(e.Start(":1323"))
}

// Handler
func hello(c echo.Context) error {
  return c.String(http.StatusOK, "Hello, World!")
}

Help

Contribute

Use issues for everything

  • For a small change, just send a PR.
  • For bigger changes open an issue for discussion before sending a PR.
  • PR should have:
    • Test case
    • Documentation
    • Example (If it makes sense)
  • You can also contribute by:
    • Reporting issues
    • Suggesting new features or enhancements
    • Improve/fix documentation

Credits

License

MIT

Comments
  • Echo v3

    Echo v3

    Making Echo as simple as it was in v1

    • [x] Drop fasthttp support to keep the project simple, easy to maintain, aligned with standard library and compatible with community packages. As simple as it was in v1.
    • [x] Skipper function to conditionally skip a middleware
    • [x] Update docs
    • [x] Update recipes
      • [x] Put back WebSocket
      • [x] Put back Graceful shutdown
    • [x] Release notes and migrating guide
    • [x] Use standard lib for serving files #471
    • [x] Wrap standard handler
    • [x] Wrap standard middleware
    • [x] Auto TLS via https://letsencrypt.org
    • [x] Map type as shorthand for map[string]interface{}
    • [x] Built-in graceful shutdown
    • [x] https://github.com/labstack/echo/issues/669#issuecomment-252396200
    • [x] Remove static middleware
    • [x] and more...

    @ericmdantas @o1egl @CaptainCodeman @mtojek @Anon-Penguin @gavv @01walid @ipfans @matcornic

    Open for discussion

    enhancement discussion 
    opened by vishr 64
  • Tags are breaking after v3.2.1

    Tags are breaking after v3.2.1

    Prior to version 3.2.1 inclusive, tags had the format v3.2.1, which was correct and works for Dep / Go modules (vgo). After version 3.2.1 (>=3.2.2), you use a tag format 3.2.2 that is incompatible with Go modules (vgo).

    If you try to use Go modules (vgo, go1.11 was released), than you see something like this:

    require (
    ...
    github.com/labstack/echo v0.0.0-20180412143600-6d227dfea4d2
    ...
    )
    

    Main changes that was done in 3.2.2, tag name:

    • before vX.Y.Z
    • after X.Y.Z

    v was dropped 😔

    enhancement 
    opened by im-kulikov 43
  • Who's using Echo?

    Who's using Echo?

    If you are using Echo in your personal projects or at work, please consider getting it listed on README.

    • Synack
    • Software Motor
    • https://cozy.io

    PS: Just mention as a comment.

    wontfix notification 
    opened by vishr 41
  • "binding element must be a struct" introduced with path params binding

    Issue Description

    This is simillar to #988 and introduced by https://github.com/labstack/echo/commit/858270f6f5e4fd02d9e147e8a6b0d97df023f14b in a specific situation: taking the address of your struct twice and sending it to bind.

    u := &user{}
    c.Bind(&u)
    

    Because of the newly introduced params binding, when the struct's type is checked, it fails here:

    func (b *DefaultBinder) bindData(ptr interface{}, data map[string][]string, tag string) error {
    	typ := reflect.TypeOf(ptr).Elem()
    	val := reflect.ValueOf(ptr).Elem()
    
    	if typ.Kind() != reflect.Struct {
    		return errors.New("binding element must be a struct")
    	}
    

    Before the params binding was introduced, bindData was not called for POST/PUT/PATCH, because for these methods you directly decode the body into the given struct.

    And a mention: If you have id both as path param and json property in the request body, the value from the body will overwrite the one from the path. This could lead to confusion and bugs in projects.

    Checklist

    • [x] Dependencies installed
    • [x] No typos
    • [x] Searched existing issues and docs

    Expected behaviour

    If this is known and planned for next major version, than it's OK, else compatibility should not be broken.

    Actual behaviour

    See Expected behaviour

    Steps to reproduce

    Take the address of the struct sent at bind twice and make a request to a server (see Working code to debug).

    curl -X PUT -H "Content-Type: application/json" -d '{"name":"John"}' localhost:8811/users/1
    

    Working code to debug

    package main
    
    import (
    	"github.com/labstack/echo/v4"
    	"github.com/labstack/echo/v4/middleware"
    	"github.com/labstack/gommon/log"
    )
    
    type user struct {
    	ID int `json:"id" param:"id"`
    	Name string `json:"name"`
    }
    
    func main() {
    	s := echo.New()
    	s.Use(middleware.Logger())
    
    	s.PUT("/users/:id", func(c echo.Context) error {
    		u := &user{}
    		if err := c.Bind(&u); err != nil {
    			log.Fatal(err)
    		}
    		log.Print(u)
    		return nil
    	})
    
    	s.Start(":8811")
    }
    

    Version/commit

    https://github.com/labstack/echo/commit/858270f6f5e4fd02d9e147e8a6b0d97df023f14b

    bug 
    opened by andreiavrammsd 39
  • HttpOnly cookie of CSRF token

    HttpOnly cookie of CSRF token

    As mentioned in Wikipedia:

    An HttpOnly cookie cannot be accessed by client-side APIs, such as JavaScript.

    I updated the echo to last version and now the csrf cookie is HttpOnly enabled. Thus it is not possible to get data using AJAX.

    question 
    opened by yaa110 39
  • Echo v5

    Echo v5

    Let me know what you want to see in v5 ✌️

    Here are my thoughts?

    • ~~I don't like Context as an interface, we did it to expand on it using a custom context; however, casting it back in handler is tedious~~
    • Simplified middleware signature like in v1/v2? making it easier to write a middleware.
    • Bind path parameters
    • Merge https://github.com/labstack/echo/pull/1328 with JWTErrorHandler (How about adding next to the handler so you can rely on next auth handler)
    v5 
    opened by vishr 38
  • nested resources and named params problem

    nested resources and named params problem

    I have the nested resource routes, below case will be failed:

        r.Add("GET", "/users/new", func(*Context) {}, nil)
        r.Add("GET", "/users/wen", func(*Context) {}, nil)
        r.Add("GET", "/users/:id", func(*Context) {}, nil)
        r.Add("GET", "/users/:userId/photos/:photoId/comments/:id", func(*Context) {}, nil)
        h, _, _ := r.Find(MethodGET, "/users/233/photos/377/comments/610")
        if h == nil {
            t.Fatal("handle not found")
        }
    
    

    Tree

    └── /users/ has=0, h=<nil>, echo=0, edges=3
        ├── new has=0, h=0x6e8a0, echo=0, edges=0
        ├── wen has=0, h=0x6e8b0, echo=0, edges=0
        └── : has=0, h=<nil>, echo=0, edges=2
            ├── id has=0, h=0x6e8c0, echo=0, edges=0
            └── userId has=0, h=<nil>, echo=0, edges=1
                └── /photos/ has=1, h=<nil>, echo=0, edges=1
                    └── :photoId has=0, h=<nil>, echo=0, edges=1
                        └── /comments/ has=1, h=<nil>, echo=0, edges=1
                            └── :id has=0, h=0x6e8d0, echo=0, edges=0
    
    opened by fundon 36
  • Add support for a Scanner interface.

    Add support for a Scanner interface.

    This duplicates the Scanner interface implemented by the standard library's sql package, extending echo's standard Binder to support arbitrary data types, so long as they implement this interface.

    This solves #763.

    opened by flimzy 35
  • Work around issue#1244

    Work around issue#1244

    • go.mod module name changed github.com/labstack/echo -> github.com/labstack/echo/v3
    • replace imports with .../echo/v3...

    PS: if I correctly understand #1244


    cc @vishr @alexaandru

    opened by im-kulikov 33
  • Echo v2 proposal

    Echo v2 proposal

    https://github.com/labstack/echo/tree/v2

    • [x] Echo.Context as interface #146
    • [x] Request, Response and their fields as interface
      • Enables easy testing and loading context with your own functions.
    • [x] Decoupling from standard HTTP API which allows you use any HTTP engine underneath, for example, fasthttp. #290
    • [x] Drop Context#JSONIndent and Context#XMLIndent and use formatting while debug is on
    • [x] JSONBlob 4e57fa0557593aea5f1b8fdd26d64c09e81a108c
    • [x] AutoIndex as middleware
    • [x] Fix Context#Redirect
    • [x] https://github.com/labstack/echo/pull/355
    • [x] Binder https://github.com/labstack/echo/pull/352/files
    • [x] https://github.com/labstack/echo/issues/307
    • [x] a81670211f64a31cee96c177e799780a25fc6d5a
    • [x] https://github.com/labstack/echo/pull/338
    • [x] https://github.com/labstack/echo/pull/358
    • [x] Wrapper for handler
    • [x] Wrapper for middleware
    • [x] https://github.com/labstack/echo/commit/49fb8a5c62c91767df37884219e4c6ecd9964e74
    • [x] Godoc
    • [x] Website
      • [x] https://github.com/labstack/echo/issues/369#issuecomment-205732520

    Open for discussion!

    discussion 
    opened by vishr 33
  • Introduced Go module support as v4, removed obsolete CloseNotifier()

    Introduced Go module support as v4, removed obsolete CloseNotifier()

    This reintroduces support for Go modules, as v4

    CloseNotifier() is removed as it has been obsoleted, see https://golang.org/doc/go1.11#net/http It was already NOT working (not sending signals) as of 1.11, the functionality was gone already, we merely deleted the functions that exposed it. If everyone still rely on it they should migrate to using c.Request().Context().Done() instead.

    Closes #1268, #1255

    opened by alexaandru 29
  • Is there any way for adding a group to echo.Echo or echo.Group?

    Is there any way for adding a group to echo.Echo or echo.Group?

    Issue Description

    Hello everyone! Me and my team is now working for building a web api server, and we both have different apis. So I would like to divide different api by using echo.Group. I want to write a interface and let all developer implement it for their own need, And below is how I wanted(not actual code, won't work!)

    main.go

    
    var(
      SubGroupSlice = make([]*echo.Group, 0)
    )
    
    func main() {
      web := echo.New()
      for _, g := range SubGroupSlice {
        web.Group(g)
      }
      web.Start("0.0.0.0:80)
    }
    
    type CustomGroup interface{
      AddGroup()
    }
    

    custom_group.go

    func init(){
      group := &MyGroup{ group: &echo.Group{} }
      group.Build()
      group.AddGroup()
    }
    
    type MyGroup struct {
      group *echo.Group
    }
    
    
    func (g *MyGroup) Build() {
      g.group.Use(XXX)
      g.Get("/XXX", func(){ XXX })
    }
    
    func (g *MyGroup) AddGroup() {
      SubGroupSlice = SubGroupSlice.append(g.group)
    }
    
    

    I know there's no such a echo.Echo.Group(g *echo.Group) function, so I want to know if there's any way to achieve this. This allow us to easily extend the web server without interfering existing code, and since init will executed before main(), all added group will be available.

    Checklist

    • [ Y ] Dependencies installed
    • [ Y ] No typos
    • [ Y ] Searched existing issues and docs

    Expected behaviour

    Some workaround to achieve this behavior

    Actual behaviour

    I haven't found any

    Steps to reproduce

    Null

    Working code to debug

    Null

    Version/commit

    Echo V4.9.0

    opened by JobberRT 6
  • Domain labstack.com should redirect to echo.labstack.com instead of displaying a placeholder

    Domain labstack.com should redirect to echo.labstack.com instead of displaying a placeholder

    opened by trallnag 1
  • Logging level middleware

    Logging level middleware

    I added level field to logging template and allow customize with LevelSetter function for different use cases. For example, you can set level to info by just checking err == nil and/or you can set error when request responded with 500 and/or error is not nil.

    Adding level field to logs allows better filtering and observability in your log stack.

    opened by beykansen 1
  • gzip response only if it exceeds a minimal length

    gzip response only if it exceeds a minimal length

    If the response is too short, e.g. a few bytes, compressing the response makes it even larger. The new parameter MinLength to the GzipConfig struct allows to set a threshold (in bytes) as of which response size the compression should be applied. If the response is shorter, no compression will be applied.

    opened by ioppermann 5
  • Router not working with custom methods after parameter

    Router not working with custom methods after parameter

    Issue Description

    Router Find not working with "custom methods".
    It seems that the fix made in issue #2046, does not deal with routes that have a custom method after parameter, (examples in the code below)

    Checklist

    • [x] Dependencies installed
    • [x] No typos
    • [x] Searched existing issues and docs

    Expected behaviour

    Match routes with custom actions and parameters

    Actual behaviour

    Overwriting routes, when it should treat as a different route

    Steps to reproduce

    Code bellow

    Working code to debug

    package main
    
    import (
    	"strings"
    	"testing"
    
    	"github.com/labstack/echo/v4"
    	"github.com/stretchr/testify/assert"
    )
    
    func TestEscape(t *testing.T) {
    	e := echo.New()
    
    	router := echo.NewRouter(e)
    
    	router.Add(strings.ToUpper("PUT"), "/api/users/:id", void)
    	router.Add(strings.ToUpper("POST"), "/api/users/:id\\:customAction", void)
    	router.Add(strings.ToUpper("POST"), "/api/users/:id\\:otherAction", void)
    
    	echoContext := e.NewContext(nil, nil)
    
    	router.Find("GET", "/api/users/123", echoContext)
    	genericRoute := echoContext.Path()
    	assert.Equal(t, "/api/users/:id", genericRoute)
    
    	router.Find("POST", "/api/users/123:customAction", echoContext)
    	genericRouteCustomAction := echoContext.Path()
    	assert.Equal(t, "/api/users/:id:customAction", genericRouteCustomAction)
    
    	router.Find("POST", "/api/users/123:otherAction", echoContext)
    	genericRouteOtherAction := echoContext.Path()
    	assert.Equal(t, "/api/users/:id:otherAction", genericRouteOtherAction)
    
          //All "Finds" calls return the "/api/users/:id\\:otherAction" route
    }
    
    func void(c echo.Context) error {
    	return nil
    }
    
    

    Version/commit

    v4.9.0

    router 
    opened by dalmarcolucas 3
Releases(v4.9.0)
  • v4.9.0(Sep 4, 2022)

    Security

    • Fix open redirect vulnerability in handlers serving static directories (e.Static, e.StaticFs, echo.StaticDirectoryHandler) #2260

    Enhancements

    • Allow configuring ErrorHandler in CSRF middleware #2257
    • Replace HTTP method constants in tests with stdlib constants #2247
    Source code(tar.gz)
    Source code(zip)
  • v4.8.0(Aug 10, 2022)

    Most notable things

    You can now add any arbitrary HTTP method type as a route #2237

    e.Add("COPY", "/*", func(c echo.Context) error 
      return c.String(http.StatusOK, "OK COPY")
    })
    

    You can add custom 404 handler for specific paths #2217

    e.RouteNotFound("/*", func(c echo.Context) error { return c.NoContent(http.StatusNotFound) })
    
    g := e.Group("/images")
    g.RouteNotFound("/*", func(c echo.Context) error { return c.NoContent(http.StatusNotFound) })
    

    Enhancements

    • Add new value binding methods (UnixTimeMilli,TextUnmarshaler,JSONUnmarshaler) to Valuebinder #2127
    • Refactor: body_limit middleware unit test #2145
    • Refactor: Timeout mw: rework how test waits for timeout. #2187
    • BasicAuth middleware returns 500 InternalServerError on invalid base64 strings but should return 400 #2191
    • Refactor: duplicated findStaticChild process at findChildWithLabel #2176
    • Allow different param names in different methods with same path scheme #2209
    • Add support for registering handlers for different 404 routes #2217
    • Middlewares should use errors.As() instead of type assertion on HTTPError #2227
    • Allow arbitrary HTTP method types to be added as routes #2237
    Source code(tar.gz)
    Source code(zip)
  • v4.7.2(Mar 16, 2022)

    Fixes

    • Fix nil pointer exception when calling Start again after address binding error #2131
    • Fix CSRF middleware not being able to extract token from multipart/form-data form #2136
    • Fix Timeout middleware write race #2126

    Enhancements

    • Recover middleware should not log panic for aborted handler #2134
    Source code(tar.gz)
    Source code(zip)
  • v4.7.1(Mar 13, 2022)

    Fixes

    • Fix e.Static, .File(), c.Attachment() being picky with paths starting with ./, ../ and / after 4.7.0 introduced echo.Filesystem support (Go1.16+) #2123

    Enhancements

    • Remove some unused code #2116
    Source code(tar.gz)
    Source code(zip)
  • v4.7.0(Mar 2, 2022)

    Enhancements

    • Add JWT, KeyAuth, CSRF multivalue extractors #2060
    • Add LogErrorFunc to recover middleware #2072
    • Add support for HEAD method query params binding #2027
    • Improve filesystem support with echo.FileFS, echo.StaticFS, group.FileFS, group.StaticFS #2064

    Fixes

    General

    • Add cache-control and connection headers #2103
    • Add Retry-After header constant #2078
    • Upgrade go directive in go.mod to 1.17 #2049
    • Add Pagoda #2077 and Souin #2069 to 3rd-party middlewares in README
    Source code(tar.gz)
    Source code(zip)
  • v4.6.3(Jan 10, 2022)

  • v4.6.2(Jan 8, 2022)

    Fixes

    • Fixed route containing escaped colon should be matchable but is not matched to request path #2047
    • Fixed a problem that returned wrong content-encoding when the gzip compressed content was empty. #1921
    • Update (test) dependencies #2021

    Enhancements

    • Add support for configurable target header for the request_id middleware #2040
    • Change decompress middleware to use stream decompression instead of buffering #2018
    • Documentation updates
    Source code(tar.gz)
    Source code(zip)
  • v4.6.1(Sep 26, 2021)

  • v4.6.0(Sep 20, 2021)

    Introduced a new request logger middleware to help with cases when you want to use some other logging library in your application.

    Fixes

    • fix timeout middleware warning: superfluous response.WriteHeader #1905

    Enhancements

    • Add Cookie to KeyAuth middleware's KeyLookup #1929
    • JWT middleware should ignore case of auth scheme in request header #1951
    • Refactor default error handler to return first if response is already committed #1956
    • Added request logger middleware which helps to use custom logger library for logging requests. #1980
    • Allow escaping of colon in route path so Google Cloud API "custom methods" could be implemented #1988
    Source code(tar.gz)
    Source code(zip)
  • v4.5.0(Aug 2, 2021)

    Important notes

    A BREAKING CHANGE is introduced for JWT middleware users.

    The JWT library used for the JWT middleware had to be changed from github.com/dgrijalva/jwt-go to github.com/golang-jwt/jwt due former library being unmaintained and affected by security issues. The github.com/golang-jwt/jwt project is a drop-in replacement, but supports only the latest 2 Go versions. So for JWT middleware users Go 1.15+ is required. For detailed information please read #1940

    To change the library imports in all .go files in your project replace all occurrences of dgrijalva/jwt-go with golang-jwt/jwt.

    For Linux CLI you can use:

    find -type f -name "*.go" -exec sed -i "s/dgrijalva\/jwt-go/golang-jwt\/jwt/g" {} \;
    go mod tidy
    

    Fixes

    • Change JWT library to github.com/golang-jwt/jwt #1946
    Source code(tar.gz)
    Source code(zip)
  • v4.4.0(Jul 12, 2021)

    Fixes

    • Split HeaderXForwardedFor header only by comma #1878
    • Fix Timeout middleware Context propagation #1910

    Enhancements

    • Allow for custom JSON encoding implementations #1880
    • Adds JWTConfig.ParseTokenFunc to JWT middleware to allow different libraries implementing JWT parsing. #1887
    • Adds RequestIDHandler function to RequestID middleware #1898
    • Bind data using headers as source #1866
    • Adding tests for Echo#Host #1895
    Source code(tar.gz)
    Source code(zip)
  • v4.3.0(May 8, 2021)

    Important notes

    • Route matching has improvements for following cases:
      1. Correctly match routes with parameter part as last part of route (with trailing backslash)
      2. Considering handlers when resolving routes and search for matching http method handler
    • Echo minimal Go version is now 1.13.

    Fixes

    • When url ends with slash first param route is the match #1804
    • Router should check if node is suitable as matching route by path+method and if not then continue search in tree #1808
    • Fix timeout middleware not writing response correctly when handler panics #1864
    • Fix binder not working with embedded pointer structs #1861
    • Add Go 1.16 to CI and drop 1.12 specific code #1850

    Enhancements

    • Make KeyFunc public in JWT middleware #1756
    • Add support for optional filesystem to the static middleware #1797
    • Add a custom error handler to key-auth middleware #1847
    • Allow JWT token to be looked up from multiple sources #1845
    Source code(tar.gz)
    Source code(zip)
  • v4.2.2(Apr 7, 2021)

    Fixes

    • Allow proxy middleware to use query part in rewrite (#1802)
    • Fix timeout middleware not sending status code when handler returns an error (#1805)
    • Fix Bind() when target is array/slice and path/query params complains bind target not being struct (#1835)
    • Fix panic in redirect middleware on short host name (#1813)
    • Fix timeout middleware docs (#1836)
    Source code(tar.gz)
    Source code(zip)
  • v4.2.1(Mar 8, 2021)

    Important notes

    Due to a datarace the config parameters for the newly added timeout middleware required a change. See the docs. A performance regression has been fixed, even bringing better performance than before for some routing scenarios.

    Fixes

    • Fix performance regression caused by path escaping (#1777, #1798, #1799, aldas)
    • Avoid context canceled errors (#1789, clwluvw)
    • Improve router to use on stack backtracking (#1791, aldas, stffabi)
    • Fix panic in timeout middleware not being not recovered and cause application crash (#1794, aldas)
    • Fix Echo.Serve() not serving on HTTP port correctly when TLSListener is used (#1785, #1793, aldas)
    • Apply go fmt (#1788, Le0tk0k)
    • Uses strings.Equalfold (#1790, rkilingr)
    • Improve code quality (#1792, withshubh)

    This release was made possible by our contributors: aldas, clwluvw, lammel, Le0tk0k, maciej-jezierski, rkilingr, stffabi, withshubh

    Source code(tar.gz)
    Source code(zip)
  • v4.2.0(Feb 11, 2021)

    Important notes

    The behavior for binding data has been reworked for compatibility with echo before v4.1.11 by enforcing explicit tagging for processing parameters. This may break your code if you expect combined handling of query/path/form params. Please see the updated documentation for request and binding

    The handling for rewrite rules has been slightly adjusted to expand * to a non-greedy (.*?) capture group. This is only relevant if multiple asterisks are used in your rules. Please see rewrite and proxy for details.

    Security

    • Fix directory traversal vulnerability for Windows (#1718, little-cui)
    • Fix open redirect vulnerability with trailing slash (#1771,#1775 aldas,GeoffreyFrogeye)

    Enhancements

    • Add Echo#ListenerNetwork as configuration (#1667, pafuent)
    • Add ability to change the status code using response beforeFuncs (#1706, RashadAnsari)
    • Echo server startup to allow data race free access to listener address
    • Binder: Restore pre v4.1.11 behaviour for c.Bind() to use query params only for GET or DELETE methods (#1727, aldas)
    • Binder: Add separate methods to bind only query params, path params or request body (#1681, aldas)
    • Binder: New fluent binder for query/path/form parameter binding (#1717, #1736, aldas)
    • Router: Performance improvements for missed routes (#1689, pafuent)
    • Router: Improve performance for Real-IP detection using IndexByte instead of Split (#1640, imxyb)
    • Middleware: Support real regex rules for rewrite and proxy middleware (#1767)
    • Middleware: New rate limiting middleware (#1724, iambenkay)
    • Middleware: New timeout middleware implementation for go1.13+ (#1743, )
    • Middleware: Allow regex pattern for CORS middleware (#1623, KlotzAndrew)
    • Middleware: Add IgnoreBase parameter to static middleware (#1701, lnenad, iambenkay)
    • Middleware: Add an optional custom function to CORS middleware to validate origin (#1651, curvegrid)
    • Middleware: Support form fields in JWT middleware (#1704, rkfg)
    • Middleware: Use sync.Pool for (de)compress middleware to improve performance (#1699, #1672, pafuent)
    • Middleware: Add decompress middleware to support gzip compressed requests (#1687, arun0009)
    • Middleware: Add ErrJWTInvalid for JWT middleware (#1627, juanbelieni)
    • Middleware: Add SameSite mode for CSRF cookies to support iframes (#1524, pr0head)

    Fixes

    • Fix handling of special trailing slash case for partial prefix (#1741, stffabi)
    • Fix handling of static routes with trailing slash (#1747)
    • Fix Static files route not working (#1671, pwli0755, lammel)
    • Fix use of caret(^) in regex for rewrite middleware (#1588, chotow)
    • Fix Echo#Reverse for Any type routes (#1695, pafuent)
    • Fix Router#Find panic with infinite loop (#1661, pafuent)
    • Fix Router#Find panic fails on Param paths (#1659, pafuent)
    • Fix DefaultHTTPErrorHandler with Debug=true (#1477, lammel)
    • Fix incorrect CORS headers (#1669, ulasakdeniz)
    • Fix proxy middleware rewritePath to use url with updated tests (#1630, arun0009)
    • Fix rewritePath for proxy middleware to use escaped path in (#1628, arun0009)
    • Remove unless defer (#1656, imxyb)

    General

    • New maintainers for Echo: Roland Lammel (@lammel) and Pablo Andres Fuente (@pafuent)
    • Add GitHub action to compare benchmarks (#1702, pafuent)
    • Binding query/path params and form fields to struct only works for explicit tags (#1729,#1734, aldas)
    • Add support for Go 1.15 in CI (#1683, asahasrabuddhe)
    • Add test for request id to remain unchanged if provided (#1719, iambenkay)
    • Refactor echo instance listener access and startup to speed up testing (#1735, aldas)
    • Refactor and improve various tests for binding and routing
    • Run test workflow only for relevant changes (#1637, #1636, pofl)
    • Update .travis.yml (#1662, santosh653)
    • Update README.md with an recents framework benchmark (#1679, pafuent)

    This release was made possible by over 100 commits from more than 20 contributors: asahasrabuddhe, aldas, AndrewKlotz, arun0009, chotow, curvegrid, iambenkay, imxyb, juanbelieni, lammel, little-cui, lnenad, pafuent, pofl, pr0head, pwli, RashadAnsari, rkfg, santosh653, segfiner, stffabi, ulasakdeniz

    Source code(tar.gz)
    Source code(zip)
  • v4.1.17(Aug 28, 2020)

  • v4.1.16(Mar 30, 2020)

  • v4.1.15(Feb 29, 2020)

    • Fix panic in FormFile if file not found (#1515)
    • Safer/trustable extraction of real ip from request (#1478)
    • Fix #1493 router loop for param routes (#1502)
    • Fix crash on OpenBSD due to unsupported TCP KeepAlivePeriod (#1456)
    • Migrate to GitHub Actions (#1473)
    • Support HTTP/2 h2c mode (cleartext) (#1489)
    Source code(tar.gz)
    Source code(zip)
  • v4.1.14(Jan 24, 2020)

  • v4.1.13(Jan 1, 2020)

  • v4.1.12(Dec 30, 2019)

    #1412 Fix multi level match any routes Add ability to set the logger on echo.Context (#1377) Fixed comment typo in BodyDump (#1431) Reset p.values to echo.maxParam (#1429) Close file descriptor returned by request.FormFile (#1411) Fixed #988

    Source code(tar.gz)
    Source code(zip)
  • v4.1.11(Oct 7, 2019)

  • v4.1.10(Aug 17, 2019)

  • v4.1.9(Aug 11, 2019)

  • v4.1.8(Aug 5, 2019)

  • v4.1.7(Aug 2, 2019)

    • Enhanced default http error handler ed51400
    • Add a new ErrorHandlerWithContext (#1328)
    • Add ReferrerPolicy to Secure middleware (#1363)
    • Don't make router parse duplicated param when backtracking happens (#1368)
    • Fix #1260 change middleware.Logger's default output (#1336)
    • Nil check for bind #988
    • Added feature to map url params to a struct with the default binder
    • Tests and fix for findChildByKind executed on nil node (Router)
    Source code(tar.gz)
    Source code(zip)
  • v4.1.6(Jun 9, 2019)

    • Fixed indentation in code example (#1338)
    • Provide possibility to use key ids (#1289)
    • Fix for #1334 (#1335)
    • Update x/sys module to support Risc-V (#1344)
    • Added support for the REPORT method (#1332)
    • Add support for encoding.TextUnmarshaler in bind (#1314)
    • Added param: lookup option to JWT Middleware (#1296)
    • Bug #1323
    Source code(tar.gz)
    Source code(zip)
  • v4.1.5(Apr 30, 2019)

  • v4.1.4(Apr 29, 2019)

  • v4.1.3(Apr 29, 2019)

beego is an open-source, high-performance web framework for the Go programming language.

Beego Beego is used for rapid development of enterprise application in Go, including RESTful APIs, web apps and backend services. It is inspired by To

astaxie 532 Sep 25, 2022
Gearbox :gear: is a web framework written in Go with a focus on high performance

gearbox ⚙️ is a web framework for building micro services written in Go with a focus on high performance. It's built on fasthttp which is up to 10x fa

Gearbox 672 Sep 27, 2022
hiboot is a high performance web and cli application framework with dependency injection support

Hiboot - web/cli application framework About Hiboot is a cloud native web and cli application framework written in Go. Hiboot is not trying to reinven

hidevops.io 177 Aug 27, 2022
Gearbox :gear: is a web framework written in Go with a focus on high performance

gearbox ⚙️ is a web framework for building micro services written in Go with a focus on high performance. It's built on fasthttp which is up to 10x fa

Gearbox 669 Sep 22, 2022
High performance, simple Go web framework

Elton Elton的实现参考了koa以及echo,中间件的调整均为洋葱模型:请求由外至内,响应由内至外。主要特性如下: 处理函数(中间件)均以返回error的形式响应出错,方便使用统一的出错处理中间件将出错统一转换为对应的输出(JSON),并根据出错的类型等生成各类统计分析 成功响应数据直接赋值

Tree Xie 61 Jul 11, 2022
beego is an open-source, high-performance web framework for the Go programming language.

Beego Beego is used for rapid development of enterprise application in Go, including RESTful APIs, web apps and backend services. It is inspired by To

beego Framework 28.9k Sep 27, 2022
letgo is an open-source, high-performance web framework for the Go programming language.

high-performance Lightweight web framework for the Go programming language. golang web framework,高可用golang web框架,go语言 web框架 ,go web

wjp 349 Sep 7, 2022
Dragon 🐲 🐲 🐲 is an enterprise high performance web framework with Go for the feature and comfortable develop.

Dragon start dragon ab performance Dragon ?? ?? ?? is a lightweight high performance web framework with Go for the feature and comfortable develop. 中文

dragon 8 Sep 14, 2022
Dragon 🐲 🐲 🐲 is a lightweight high performance web framework with Go for the feature and comfortable develop.

Dragon project new link start dragon ab performance Dragon ?? ?? ?? is a lightweight high performance web framework with Go for the feature and comfor

azerothyang 0 Sep 6, 2022
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.

GoFrame English | 简体中文 GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang. If you're a

GoFrame 8.2k Sep 22, 2022
Flamingo Framework and Core Library. Flamingo is a go based framework for pluggable web projects. It is used to build scalable and maintainable (web)applications.

Flamingo Framework Flamingo is a web framework based on Go. It is designed to build pluggable and maintainable web projects. It is production ready, f

Flamingo 317 Sep 27, 2022
Golanger Web Framework is a lightweight framework for writing web applications in Go.

/* Copyright 2013 Golanger.com. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except

golanger 299 Mar 3, 2022
The jin is a simplified version of the gin web framework that can help you quickly understand the core principles of a web framework.

jin About The jin is a simplified version of the gin web framework that can help you quickly understand the core principles of a web framework. If thi

null 8 Jul 14, 2022
Tigo is an HTTP web framework written in Go (Golang).It features a Tornado-like API with better performance. Tigo是一款用Go语言开发的web应用框架,API特性类似于Tornado并且拥有比Tornado更好的性能。

Tigo(For English Documentation Click Here) 一个使用Go语言开发的web框架。 相关工具及插件 tiger tiger是一个专门为Tigo框架量身定做的脚手架工具,可以使用tiger新建Tigo项目或者执行其他操作。

Karl 1.4k Sep 25, 2022
Package macaron is a high productive and modular web framework in Go.

Macaron Package macaron is a high productive and modular web framework in Go. Getting Started The minimum requirement of Go is 1.6. To install Macaron

Macaron 3.3k Sep 25, 2022
A high productivity, full-stack web framework for the Go language.

Revel Framework A high productivity, full-stack web framework for the Go language. Current Version: 1.0.0 (2020-07-11) Supports go.mod package managem

Revel Framework 12.7k Sep 20, 2022
Goal is a toolkit for high productivity web development in Go language in the spirit of Revel Framework that is built around the concept of code generation.

Goal Goal is a set of tools for high productivity web development in Go language. Goal, being mostly inspired by Revel Framework and its discussions,

null 88 Sep 27, 2021
A high level web-framework for Go

go-start is a high level web-framework for Go, like Django for Python or Rails for Ruby. Installation: go get github.com/ungerik/go-start Documentatio

Erik Unger 268 Sep 25, 2022
⚡ Rux is an simple and fast web framework. support middleware, compatible http.Handler interface. 简单且快速的 Go web 框架,支持中间件,兼容 http.Handler 接口

Rux Simple and fast web framework for build golang HTTP applications. NOTICE: v1.3.x is not fully compatible with v1.2.x version Fast route match, sup

Gookit 81 Jul 20, 2022