|
|
há 5 anos atrás | |
|---|---|---|
| .. | ||
| middleware | há 7 anos atrás | |
| .editorconfig | há 7 anos atrás | |
| .gitattributes | há 7 anos atrás | |
| .gitignore | há 7 anos atrás | |
| .travis.yml | há 7 anos atrás | |
| Gopkg.lock | há 7 anos atrás | |
| Gopkg.toml | há 7 anos atrás | |
| LICENSE | há 7 anos atrás | |
| Makefile | há 7 anos atrás | |
| README.md | há 7 anos atrás | |
| bind.go | há 7 anos atrás | |
| context.go | há 7 anos atrás | |
| echo.go | há 5 anos atrás | |
| go.mod | há 7 anos atrás | |
| go.sum | há 7 anos atrás | |
| group.go | há 7 anos atrás | |
| log.go | há 7 anos atrás | |
| response.go | há 7 anos atrás | |
| router.go | há 7 anos atrás | |
Date: 2018/03/15
Source: https://github.com/vishr/web-framework-benchmark
Lower is better!
package main
import (
"net/http"
"github.com/labstack/echo"
"github.com/labstack/echo/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!")
}
Use issues for everything