go web framework
go get github.com/xushuhui/goal
package main
import (
"net/http"
"github.com/xushuhui/goal"
)
func main() {
r := goal.Default()
r.GET("/", func(c *Context) error {
c.HTML(http.StatusOK, "<h1>Hello World</h1>")
return nil
})
r.GET("/hello", func(c *Context) error {
c.String(http.StatusOK, "hello %s, you're at %s\n", c.Query("name"), c.Path)
return nil
})
r.Run(":8000")
}
- bind
- logging