From 834f94df1330f58c549053d81c0722d906a59bb4 Mon Sep 17 00:00:00 2001 From: TheRandomCharacter <59721236+TheRandomCharacter@users.noreply.github.com> Date: Wed, 18 Oct 2023 14:47:37 +0300 Subject: [PATCH] Removes ambiguity around "fresh middleware stack" in GoDoc (#862) Co-authored-by: TheRandomCharacter --- mux.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mux.go b/mux.go index c279539a..735ab232 100644 --- a/mux.go +++ b/mux.go @@ -250,7 +250,7 @@ func (mx *Mux) With(middlewares ...func(http.Handler) http.Handler) Router { return im } -// Group creates a new inline-Mux with a fresh middleware stack. It's useful +// Group creates a new inline-Mux with a copy of middleware stack. It's useful // for a group of handlers along the same routing path that use an additional // set of middlewares. See _examples/. func (mx *Mux) Group(fn func(r Router)) Router { @@ -261,9 +261,8 @@ func (mx *Mux) Group(fn func(r Router)) Router { return im } -// Route creates a new Mux with a fresh middleware stack and mounts it -// along the `pattern` as a subrouter. Effectively, this is a short-hand -// call to Mount. See _examples/. +// Route creates a new Mux and mounts it along the `pattern` as a subrouter. +// Effectively, this is a short-hand call to Mount. See _examples/. func (mx *Mux) Route(pattern string, fn func(r Router)) Router { if fn == nil { panic(fmt.Sprintf("chi: attempting to Route() a nil subrouter on '%s'", pattern))