refactory: rebuild route tree

This commit is contained in:
loveuer
2024-02-20 15:34:00 +08:00
parent 137d4ee5c8
commit 039f4cf8c0
19 changed files with 1738 additions and 324 deletions

View File

@ -10,7 +10,7 @@ func main() {
app.Get("/nice", h1, h2)
log.Fatal(app.Run(":3333"))
log.Fatal(app.Run(":80"))
}
func h1(c *nf.Ctx) error {
@ -19,7 +19,8 @@ func h1(c *nf.Ctx) error {
return c.JSON(nf.Map{"status": 201, "msg": "nice to meet you"})
}
return c.Next()
//return c.Next()
return nil
}
func h2(c *nf.Ctx) error {