mirror of
https://github.com/labstack/echo.git
synced 2024-11-28 08:38:39 +02:00
Update README.md
This commit is contained in:
parent
c2d29f3895
commit
6db21760a9
@ -117,7 +117,7 @@ func main() {
|
|||||||
sub.Use(func(c *echo.Context) { // Middleware
|
sub.Use(func(c *echo.Context) { // Middleware
|
||||||
})
|
})
|
||||||
sub.Get("/home", func(c *echo.Context) {
|
sub.Get("/home", func(c *echo.Context) {
|
||||||
c.String(200, "Sub route /sub/welcome")
|
c.Text(http.StatusOK, "Sub route /sub/welcome")
|
||||||
})
|
})
|
||||||
|
|
||||||
// Group - doesn't inherit parent middleware
|
// Group - doesn't inherit parent middleware
|
||||||
@ -125,7 +125,7 @@ func main() {
|
|||||||
grp.Use(func(c *echo.Context) { // Middleware
|
grp.Use(func(c *echo.Context) { // Middleware
|
||||||
})
|
})
|
||||||
grp.Get("/home", func(c *echo.Context) {
|
grp.Get("/home", func(c *echo.Context) {
|
||||||
c.String(200, "Group route /group/welcome")
|
c.Text(http.StatusOK, "Group route /group/welcome")
|
||||||
})
|
})
|
||||||
|
|
||||||
// Start server
|
// Start server
|
||||||
|
Loading…
Reference in New Issue
Block a user