Improve godoc: add links and titles (#1027)

This commit is contained in:
Olivier Mengué 2026-08-20 12:39:33 +02:00 committed by GitHub
parent 38939062c5
commit 6adf733e0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

16
chi.go
View file

@ -2,7 +2,7 @@
//
// chi supports the four most recent major versions of Go.
//
// Example:
// # Example
//
// package main
//
@ -25,11 +25,13 @@
// http.ListenAndServe(":3333", r)
// }
//
// See github.com/go-chi/chi/_examples/ for more in-depth examples.
// See [github.com/go-chi/chi/v5/_examples] for more in-depth examples.
//
// # URL patterns
//
// URL patterns allow for easy matching of path components in HTTP
// requests. The matching components can then be accessed using
// chi.URLParam(). All patterns must begin with a slash.
// [chi.URLParam](). All patterns must begin with a slash.
//
// A simple named placeholder {name} matches any sequence of characters
// up to the next / or the end of the URL. Trailing slashes on paths must
@ -37,11 +39,11 @@
//
// A placeholder with a name followed by a colon allows a regular
// expression match, for example {number:\\d+}. The regular expression
// syntax is Go's normal regexp RE2 syntax, except that / will never be
// matched. An anonymous regexp pattern is allowed, using an empty string
// before the colon in the placeholder, such as {:\\d+}
// syntax is Go's normal [regexp] RE2 syntax (see [regexp/syntax]), except
// that / will never be matched. An anonymous regexp pattern is allowed, using
// an empty string before the colon in the placeholder, such as {:\\d+}.
//
// The special placeholder of asterisk matches the rest of the requested
// The special placeholder of asterisk (*) matches the rest of the requested
// URL. Any trailing characters in the pattern are ignored. This is the only
// placeholder which will match / characters.
//