Fix unexported Prototype fields
This commit is contained in:
parent
5bf391d53b
commit
d0dd0aca1a
@ -35,7 +35,7 @@ type PrototypeErrorResponse interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Prototype struct {
|
type Prototype struct {
|
||||||
req PrototypeRequestBuilder
|
PrototypeRequestBuilder
|
||||||
res PrototypeResponse
|
PrototypeResponse
|
||||||
errRes PrototypeErrorResponse
|
PrototypeErrorResponse
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ func (srv *server) handleError(errRes ErrorResponse, w http.ResponseWriter) (ok
|
|||||||
|
|
||||||
func (srv *server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
func (srv *server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
p := srv.prototype
|
p := srv.prototype
|
||||||
req := p.req.RequestBuilder()
|
req := p.PrototypeRequestBuilder.RequestBuilder()
|
||||||
if ok := srv.handleError(req.Allowed(r.Method), w); !ok {
|
if ok := srv.handleError(req.Allowed(r.Method), w); !ok {
|
||||||
return
|
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 {
|
if ok := srv.handleError(req.Values(Values(r.Form)), w); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
res := p.res.Response()
|
res := p.PrototypeResponse.Response()
|
||||||
for _, stage := range srv.serve {
|
for _, stage := range srv.serve {
|
||||||
for _, s := range stage {
|
for _, s := range stage {
|
||||||
if ok := srv.handleError(s(req, res), w); !ok {
|
if ok := srv.handleError(s(req, res), w); !ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user