Skip to content

Commit

Permalink
Fixed panic messages
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Rana <[email protected]>
  • Loading branch information
vishr committed Jun 23, 2017
1 parent 7c61458 commit 06189d0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion middleware/basic_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func BasicAuth(fn BasicAuthValidator) echo.MiddlewareFunc {
func BasicAuthWithConfig(config BasicAuthConfig) echo.MiddlewareFunc {
// Defaults
if config.Validator == nil {
panic("basic-auth middleware requires a validator function")
panic("echo: basic-auth middleware requires a validator function")
}
if config.Skipper == nil {
config.Skipper = DefaultBasicAuthConfig.Skipper
Expand Down
2 changes: 1 addition & 1 deletion middleware/body_dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func BodyDump(handler BodyDumpHandler) echo.MiddlewareFunc {
func BodyDumpWithConfig(config BodyDumpConfig) echo.MiddlewareFunc {
// Defaults
if config.Handler == nil {
panic("body-dump middleware requires a handler function")
panic("echo: body-dump middleware requires a handler function")
}
if config.Skipper == nil {
config.Skipper = DefaultBodyDumpConfig.Skipper
Expand Down
2 changes: 1 addition & 1 deletion middleware/body_limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func BodyLimitWithConfig(config BodyLimitConfig) echo.MiddlewareFunc {

limit, err := bytes.Parse(config.Limit)
if err != nil {
panic(fmt.Errorf("invalid body-limit=%s", config.Limit))
panic(fmt.Errorf("echo: invalid body-limit=%s", config.Limit))
}
config.limit = limit
pool := limitedReaderPool(config)
Expand Down
2 changes: 1 addition & 1 deletion middleware/key_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func KeyAuthWithConfig(config KeyAuthConfig) echo.MiddlewareFunc {
config.KeyLookup = DefaultKeyAuthConfig.KeyLookup
}
if config.Validator == nil {
panic("key-auth middleware requires a validator function")
panic("echo: key-auth middleware requires a validator function")
}

// Initialize
Expand Down

0 comments on commit 06189d0

Please sign in to comment.