|
|
5 gadi atpakaļ | |
|---|---|---|
| .. | ||
| middleware | 7 gadi atpakaļ | |
| .editorconfig | 7 gadi atpakaļ | |
| .gitattributes | 7 gadi atpakaļ | |
| .gitignore | 7 gadi atpakaļ | |
| .travis.yml | 7 gadi atpakaļ | |
| Gopkg.lock | 7 gadi atpakaļ | |
| Gopkg.toml | 7 gadi atpakaļ | |
| LICENSE | 7 gadi atpakaļ | |
| Makefile | 7 gadi atpakaļ | |
| README.md | 7 gadi atpakaļ | |
| bind.go | 7 gadi atpakaļ | |
| context.go | 7 gadi atpakaļ | |
| echo.go | 5 gadi atpakaļ | |
| go.mod | 7 gadi atpakaļ | |
| go.sum | 7 gadi atpakaļ | |
| group.go | 7 gadi atpakaļ | |
| log.go | 7 gadi atpakaļ | |
| response.go | 7 gadi atpakaļ | |
| router.go | 7 gadi atpakaļ | |
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