package rpc import ( fmt "fmt" http "net/http" ) func New() http.Handler { mux := http.NewServeMux() for _, handler := range handlers() { fmt.Printf("Registering : %v\n", handler.PathPrefix()) mux.Handle(handler.PathPrefix(), handler) } return mux } func handlers() []TwirpServer { return []TwirpServer{ NewAbilityServer(NewAbilityService()), } }