package main import ( "net/http" "github.com/facebookgo/grace/gracehttp" "github.com/sebest/xff" "goji.io" "goji.io/pat" "golang.org/x/net/context" ) func main() { mux := goji.NewMux() mux.HandleC(pat.New("/*"), NewMux()) err := gracehttp.Serve(&http.Server{Addr: ":8080", Handler: mux}) if err != nil { panic(err) } } func NewMux() *goji.Mux { mux := goji.NewMux() mux.Use(xff.Handler) mux.HandleFun