diff --git a/prototype.go b/prototype.go index e9a27d9..90e9aa3 100644 --- a/prototype.go +++ b/prototype.go @@ -35,7 +35,7 @@ type PrototypeErrorResponse interface { } type Prototype struct { - req PrototypeRequestBuilder - res PrototypeResponse - errRes PrototypeErrorResponse + PrototypeRequestBuilder + PrototypeResponse + PrototypeErrorResponse } diff --git a/server.go b/server.go index c891461..de9a2b2 100644 --- a/server.go +++ b/server.go @@ -65,7 +65,7 @@ func (srv *server) handleError(errRes ErrorResponse, w http.ResponseWriter) (ok func (srv *server) ServeHTTP(w http.ResponseWriter, r *http.Request) { p := srv.prototype - req := p.req.RequestBuilder() + req := p.PrototypeRequestBuilder.RequestBuilder() if ok := srv.handleError(req.Allowed(r.Method), w); !ok { return } @@ -79,7 +79,7 @@ func (srv *server) ServeHTTP(w http.ResponseWriter, r *http.Request) { if ok := srv.handleError(req.Values(Values(r.Form)), w); !ok { return } - res := p.res.Response() + res := p.PrototypeResponse.Response() for _, stage := range srv.serve { for _, s := range stage { if ok := srv.handleError(s(req, res), w); !ok {