Fix unexported Prototype fields

This commit is contained in:
some 2024-10-08 19:15:07 -04:00
parent 5bf391d53b
commit d0dd0aca1a
Signed by: some
GPG Key ID: 65D0589220B9BFC8
2 changed files with 5 additions and 5 deletions

View File

@ -35,7 +35,7 @@ type PrototypeErrorResponse interface {
}
type Prototype struct {
req PrototypeRequestBuilder
res PrototypeResponse
errRes PrototypeErrorResponse
PrototypeRequestBuilder
PrototypeResponse
PrototypeErrorResponse
}

View File

@ -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 {