Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/go-chi/chi
/ functions
Functions
435 in github.com/go-chi/chi
⨍
Functions
435
◇
Types & classes
60
Method
Update
(w http.ResponseWriter, r *http.Request)
_examples/todos-resource/todos.go:43
Function
UpdateArticle
UpdateArticle updates an existing Article in our persistent store.
_examples/rest/main.go:186
Function
WithValue
WithValue is a middleware that sets a given key/value in a context chain.
middleware/value.go:9
Method
Write
(status, bytes int, header http.Header, elapsed time.Duration, extra interface{})
middleware/logger.go:140
Method
Write
(p []byte)
middleware/compress.go:330
Function
customHandler
(w http.ResponseWriter, r *http.Request)
_examples/custom-handler/main.go:26
Function
debugPrintTree
(parent int, i int, n *node, label byte)
tree_test.go:449
Function
encoderDeflate
(w io.Writer, level int)
middleware/compress.go:398
Function
encoderGzip
(w io.Writer, level int)
middleware/compress.go:390
Method
findEdge
(label byte)
tree.go:850
Function
getArticle
(w http.ResponseWriter, r *http.Request)
_examples/versions/main.go:103
Function
init
()
_examples/custom-method/main.go:10
Function
init
This is entirely optional, but I wanted to demonstrate how you could easily add your own logic to the render.Respond method.
_examples/rest/main.go:258
Function
init
()
middleware/middleware_test.go:17
Function
init
()
middleware/logger.go:172
Function
init
A quick note on the statistics here: we're trying to calculate the chance that two randomly generated base62 prefixes will collide. We use the formula
middleware/request_id.go:46
Function
init
()
middleware/terminal.go:37
Function
listArticles
(w http.ResponseWriter, r *http.Request)
_examples/versions/main.go:71
Function
main
()
_examples/pathvalue/main.go:10
Function
main
Please see https://github.com/go-chi/httplog for a complete package and example for writing a structured logger on chi built on the Go 1.21+ "log/slog
_examples/logging/main.go:7
Function
main
()
_examples/limits/main.go:21
Function
main
()
_examples/custom-method/main.go:16
Function
main
()
_examples/versions/main.go:22
Function
main
()
_examples/custom-handler/main.go:20
Function
main
()
_examples/todos-resource/main.go:14
Function
main
()
_examples/rest/main.go:55
Function
main
()
_examples/router-walk/main.go:11
Function
main
()
_examples/fileserver/main.go:28
Function
main
()
_examples/graceful/main.go:17
Function
main
()
_examples/hello-world/main.go:10
Function
paginate
paginate is a stub, but very possible to implement middleware logic to handle the request params for handling a paginated request.
_examples/rest/main.go:248
Function
panickingHandler
(http.ResponseWriter, *http.Request)
middleware/recoverer_test.go:13
Function
pathValueHandler
pathValueHandler retrieves a URL parameter using PathValue and writes it to the response.
_examples/pathvalue/main.go:20
Function
randomErrorMiddleware
(next http.Handler)
_examples/versions/main.go:142
Method
routeHTTP
routeHTTP routes a http.Request through the Mux routing tree to serve the matching handler for a particular http method.
mux.go:447
← previous
401–435 of 435, ranked by callers