mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
Merge branch 'master' of https://github.com/labstack/echo
This commit is contained in:
commit
c410efd290
@ -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