|
hace 6 años | |
---|---|---|
.. | ||
middleware | hace 6 años | |
.editorconfig | hace 6 años | |
.gitattributes | hace 6 años | |
.gitignore | hace 6 años | |
.travis.yml | hace 6 años | |
Gopkg.lock | hace 6 años | |
Gopkg.toml | hace 6 años | |
LICENSE | hace 6 años | |
Makefile | hace 6 años | |
README.md | hace 6 años | |
bind.go | hace 6 años | |
context.go | hace 6 años | |
echo.go | hace 6 años | |
go.mod | hace 6 años | |
go.sum | hace 6 años | |
group.go | hace 6 años | |
log.go | hace 6 años | |
response.go | hace 6 años | |
router.go | hace 6 años |
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