package main import ( "encoding/json" "fmt" "io" "net/http" "goji.io" "goji.io/pat" "golang.org/x/net/context" ) func init() { mux := goji.NewMux() mux.HandleFuncC(pat.Get("/"), index) mux.HandleFuncC(pat.Get("/hello/:name"), hello) mux.HandleFuncC(pat.Get("/article"), article) http.Handle("/", mux) } func index(c context.Context, w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "index pag