|
|
12 years ago | |
|---|---|---|
| bind | 12 years ago | |
| example | 12 years ago | |
| graceful | 12 years ago | |
| param | 12 years ago | |
| web | 12 years ago | |
| README.md | 12 years ago | |
| default.go | 12 years ago | |
| goji.go | 12 years ago | |
Goji is a minimalistic web framework inspired by Sinatra. Godoc.
package main
import (
"fmt"
"net/http"
"github.com/zenazn/goji"
"github.com/zenazn/goji/web"
)
func hello(c web.C, w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, %s!", c.UrlParams["name"])
}
func main() {
goji.Get("/hello/:name", hello)
goji.Serve()
}
Goji also includes a sample application in the example folder which
was artificially constructed to show off all of Goji's features. Check it out!
net/http/foo/:bar patterns and regular expressions)