Skip to content

Commit

Permalink
[docs] Improve docstrings for middleware, skipclean (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
elithrar committed May 13, 2018
1 parent fdeb7bc commit e3702be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion middleware.go
Expand Up @@ -15,7 +15,7 @@ type middleware interface {
Middleware(handler http.Handler) http.Handler
}

// Middleware also implements the middleware interface.
// Middleware allows MiddlewareFunc to implement the middleware interface.
func (mw MiddlewareFunc) Middleware(handler http.Handler) http.Handler {
return mw(handler)
}
Expand Down
2 changes: 1 addition & 1 deletion mux.go
Expand Up @@ -13,7 +13,7 @@ import (
)

var (
// ErrMethodMismatch is returned when the error in the request does not match
// ErrMethodMismatch is returned when the method in the request does not match
// the method defined against the route.
ErrMethodMismatch = errors.New("method is not allowed")
// ErrNotFound is returned when no route match is found.
Expand Down
4 changes: 2 additions & 2 deletions route.go
Expand Up @@ -43,8 +43,8 @@ type Route struct {
buildVarsFunc BuildVarsFunc
}

// SkipClean bypasses cleaning the path, which includes removing duplicate
// slashes and URL encoding.
// SkipClean reports whether path cleaning is enabled for this route via
// Router.SkipClean.
func (r *Route) SkipClean() bool {
return r.skipClean
}
Expand Down

0 comments on commit e3702be

Please sign in to comment.