在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:labstack/echo开源软件地址:https://github.com/labstack/echo开源编程语言:Go 99.9%开源软件介绍:Supported Go versionsAs of version 4.0.0, Echo is available as a Go module. Therefore a Go version capable of understanding /vN suffixed imports is required:
Any of these versions will allow you to import Echo as For older versions, please use the latest v3 tag. Feature Overview
BenchmarksDate: 2020/11/11 The benchmarks above were run on an Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz GuideInstallation// go get github.com/labstack/echo/{version}
go get github.com/labstack/echo/v4 Examplepackage main
import (
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"net/http"
)
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!")
} Third-party middlewares
Please send a PR to add your own library here. HelpContributeUse issues for everything
Credits
License |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论