Fix unexported Prototype fields
This commit is contained in:
parent
5bf391d53b
commit
d0dd0aca1a
@ -35,7 +35,7 @@ type PrototypeErrorResponse interface {
|
||||
}
|
||||
|
||||
type Prototype struct {
|
||||
req PrototypeRequestBuilder
|
||||
res PrototypeResponse
|
||||
errRes PrototypeErrorResponse
|
||||
PrototypeRequestBuilder
|
||||
PrototypeResponse
|
||||
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) {
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user