package main
import (
"fmt"
"github.com/Jarnpher553/godo"
"log"
)
func main() {
g := godo.New()
g.Use(func(h godo.HandleFunc) godo.HandleFunc {
return func(c *godo.Context) {
fmt.Println("lalalala")
h(c)
}
})
g.Use(func(h godo.HandleFunc) godo.HandleFunc {
return func(c *godo.Context) {
fmt.Println("nananana")
h(c)
}
})
g.Get("/", func(c *godo.Context) {
c.JSON(300, struct {
Name string
Age int
}{
Name: "aaa",
Age: 10,
})
})
err := g.Run(":9999")
if err != nil {
log.Fatalln("Server Internal Error")
}
}
-
Notifications
You must be signed in to change notification settings - Fork 0
Jarnpher553/godo
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A Go Web Learning Project
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published