Changed comment for Param().

This commit is contained in:
Alexander Andreev 2023-05-28 03:16:41 +04:00
parent 4f54ab4156
commit 653bae85f5
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -196,8 +196,8 @@ func (rr *Router) ServeStatic(path string, root http.FileSystem) error {
})
}
// Param returns a parameter (that is set like `/a/b/:key/d`) inside a path
// with a key or empty string if no such parameter found.
// Param returns a URL parameter (that is set like `/a/b/:key/d`) with a key
// or an empty string if no such parameter found.
func Param(r *http.Request, key string) string {
if params := r.Context().Value(ParamsKey).(Params); params != nil {
return params[key]