1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

overlap routing: and mvc: allow setting status code from a dependency or a middleware

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-08-28 04:11:56 +03:00
parent 933534574a
commit a6ec94e1a6
10 changed files with 181 additions and 63 deletions

View File

@@ -1,7 +1,7 @@
package versioning
import (
"errors"
"fmt"
"strings"
"github.com/kataras/iris/v12/context"
@@ -34,7 +34,7 @@ const (
// ErrNotFound reports whether a requested version
// does not match with any of the server's implemented ones.
var ErrNotFound = errors.New("version not found")
var ErrNotFound = fmt.Errorf("version %w", context.ErrNotFound)
// NotFoundHandler is the default version not found handler that
// is executed from `NewMatcher` when no version is registered as available to dispatch a resource.