1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 09:57:01 +00:00

fix UseRouter not respected by iris-cli live reload

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-09-18 02:08:27 +03:00
parent 7fa2666f58
commit d5a179cc45
4 changed files with 31 additions and 24 deletions

View File

@@ -41,6 +41,19 @@ func (fn ErrorHandlerFunc) HandleError(ctx *context.Context, err error) {
fn(ctx, err)
}
// String implements the fmt.Stringer interface.
// Returns the text corresponding to this status code, e.g. "Not Found".
// Same as iris.StatusText(int(code)).
func (code Code) String() string {
return context.StatusText(int(code))
}
// Value returns the underline int value.
// Same as int(code).
func (code Code) Value() int {
return int(code)
}
var (
// ErrSeeOther may be returned from a dependency handler to skip a specific dependency
// based on custom logic.