feat: ctx add SendStatus

This commit is contained in:
loveuer
2024-04-10 11:24:17 +08:00
parent f3fb259eee
commit 9530fa863f
3 changed files with 43 additions and 1 deletions

View File

@ -6,7 +6,11 @@ import (
)
func main() {
app := nf.New(nf.Config{EnableNotImplementHandler: true})
app := nf.New(nf.Config{})
app.Get("/ok", func(c *nf.Ctx) error {
return c.SendStatus(200)
})
api := app.Group("/api")
api.Get("/1", func(c *nf.Ctx) error {