MCPcopy Create free account

hub / github.com/go-chi/chi / functions

Functions435 in github.com/go-chi/chi

FunctionTestGetClientIPAddr_RoundTrip
(t *testing.T)
middleware/client_ip_test.go:334
FunctionTestGetClientIPAddr_Unset
(t *testing.T)
middleware/client_ip_test.go:324
FunctionTestGetHead
(t *testing.T)
middleware/get_head_test.go:11
FunctionTestHttp2FancyWriterRemembersWroteHeaderWhenFlushed
(t *testing.T)
middleware/wrap_writer_test.go:34
FunctionTestHttpFancyWriterReadFromByteCountWithTee
TestHttpFancyWriterReadFromByteCountWithTee is a regression test for https://github.com/go-chi/chi/issues/1067. httpFancyWriter.ReadFrom was adding n
middleware/wrap_writer_test.go:108
FunctionTestHttpFancyWriterReadFromHonorsDiscard
TestHttpFancyWriterReadFromHonorsDiscard verifies that Discard() suppresses the body even when it is written via ReadFrom/io.Copy. Before the fix, the
middleware/wrap_writer_test.go:131
FunctionTestHttpFancyWriterRemembersWroteHeaderWhenFlushed
(t *testing.T)
middleware/wrap_writer_test.go:25
FunctionTestInvalidIP
(t *testing.T)
middleware/realip_test.go:93
FunctionTestMethodNotAllowed
(t *testing.T)
mux_test.go:394
FunctionTestMiddlewarePanicOnLateUse
(t *testing.T)
mux_test.go:1452
FunctionTestMountingExistingPath
(t *testing.T)
mux_test.go:1474
FunctionTestMountingSimilarPattern
(t *testing.T)
mux_test.go:1489
FunctionTestMuxBasic
(t *testing.T)
mux_test.go:16
FunctionTestMuxBig
(t *testing.T)
mux_test.go:889
FunctionTestMuxComplicatedNotFound
(t *testing.T)
mux_test.go:501
FunctionTestMuxContextIsThreadSafe
(t *testing.T)
mux_test.go:1689
FunctionTestMuxEmptyParams
(t *testing.T)
mux_test.go:1516
FunctionTestMuxEmptyRoutes
(t *testing.T)
mux_test.go:266
FunctionTestMuxFind
(t *testing.T)
mux_test.go:1926
FunctionTestMuxHandlePatternValidation
(t *testing.T)
mux_test.go:646
FunctionTestMuxMatch
(t *testing.T)
mux_test.go:1862
FunctionTestMuxMatch_DoesNotHaveBasePath
(t *testing.T)
mux_test.go:1915
FunctionTestMuxMatch_HasBasePath
(t *testing.T)
mux_test.go:1900
FunctionTestMuxMiddlewareStack
(t *testing.T)
mux_test.go:758
FunctionTestMuxMissingParams
(t *testing.T)
mux_test.go:1536
FunctionTestMuxMounts
(t *testing.T)
mux_test.go:208
FunctionTestMuxNestedMethodNotAllowed
(t *testing.T)
mux_test.go:435
FunctionTestMuxNestedNotFound
(t *testing.T)
mux_test.go:316
FunctionTestMuxPlain
(t *testing.T)
mux_test.go:245
FunctionTestMuxRegexp
(t *testing.T)
mux_test.go:1584
FunctionTestMuxRegexp2
(t *testing.T)
mux_test.go:1600
FunctionTestMuxRegexp3
(t *testing.T)
mux_test.go:1616
FunctionTestMuxRouteGroups
(t *testing.T)
mux_test.go:833
FunctionTestMuxSubrouterWildcardParam
(t *testing.T)
mux_test.go:1657
FunctionTestMuxSubroutes
(t *testing.T)
mux_test.go:1181
FunctionTestMuxSubroutesBasic
(t *testing.T)
mux_test.go:1100
FunctionTestMuxTrailingSlash
Test a mux that routes a trailing slash, see also middleware/strip_test.go for an example of using a middleware to handle trailing slashes.
mux_test.go:285
FunctionTestMuxWildcardRoute
(t *testing.T)
mux_test.go:1558
FunctionTestMuxWildcardRouteCheckTwo
(t *testing.T)
mux_test.go:1571
FunctionTestMuxWith
(t *testing.T)
mux_test.go:593
FunctionTestNestedGroups
(t *testing.T)
mux_test.go:1396
FunctionTestPathValue
(t *testing.T)
path_value_test.go:10
FunctionTestPattern
(t *testing.T)
pattern_test.go:9
FunctionTestPattern
(t *testing.T)
middleware/route_headers_test.go:187
FunctionTestQueryHTTPMethod
(t *testing.T)
mux_test.go:1811
FunctionTestRecoverer
(t *testing.T)
middleware/recoverer_test.go:19
FunctionTestRecovererAbortHandler
(t *testing.T)
middleware/recoverer_test.go:78
FunctionTestRecovererNoColor
(t *testing.T)
middleware/recoverer_test.go:48
FunctionTestRedirectSlashes
(t *testing.T)
middleware/strip_test.go:102
FunctionTestRedirectSlashes_PreventBackslashRelativeOpenRedirect
(t *testing.T)
middleware/strip_test.go:276
FunctionTestReplaceWildcardsConsecutive
TestReplaceWildcardsConsecutive ensures multiple consecutive wildcards are collapsed into a single slash.
context_test.go:97
FunctionTestRequestID
(t *testing.T)
middleware/request_id_test.go:20
FunctionTestRequestLogger
(t *testing.T)
middleware/logger_test.go:21
FunctionTestRequestLoggerReadFrom
(t *testing.T)
middleware/logger_test.go:38
FunctionTestRouteHeaders
(t *testing.T)
middleware/route_headers_test.go:10
FunctionTestRoutePattern
TestRoutePattern tests correct in-the-middle wildcard removals. If user organizes a router like this: (router.go) r.Route("/v1", func(r chi.Router)
context_test.go:24
FunctionTestRouterFromMuxWith
(t *testing.T)
mux_test.go:738
FunctionTestRoutesHidesMountStub
https://github.com/go-chi/chi/issues/830 Routes() must not leak the synthetic stub handler Mount() installs on its mount pattern: a plain Mount()/Rou
tree_test.go:616
FunctionTestServeHTTPExistingContext
TODO: a Router wrapper test.. type ACLMux struct { *Mux XX string } func NewACLMux() *ACLMux { return &ACLMux{Mux: NewRouter(), XX: "hihi"} } TO
mux_test.go:1340
FunctionTestServerBaseContext
(t *testing.T)
mux_test.go:2010
FunctionTestSingleHandler
(t *testing.T)
mux_test.go:1296
FunctionTestSplit
(t *testing.T)
middleware/content_charset_test.go:94
FunctionTestStripPrefix
(t *testing.T)
middleware/strip_test.go:241
FunctionTestStripSlashes
(t *testing.T)
middleware/strip_test.go:13
FunctionTestStripSlashesInRoute
(t *testing.T)
middleware/strip_test.go:56
FunctionTestStripSlashesWithNilContext
This tests a http.Handler that is not chi.Router In these cases, the routeContext is nil
middleware/strip_test.go:203
FunctionTestSunset
(t *testing.T)
middleware/sunset_test.go:12
FunctionTestThrottleBacklog
(t *testing.T)
middleware/throttle_test.go:17
FunctionTestThrottleClientTimeout
(t *testing.T)
middleware/throttle_test.go:58
FunctionTestThrottleCustomStatusCode
(t *testing.T)
middleware/throttle_test.go:264
FunctionTestThrottleMaximum
(t *testing.T)
middleware/throttle_test.go:144
FunctionTestThrottleRetryAfter
(t *testing.T)
middleware/throttle_test.go:202
FunctionTestThrottleTriggerGatewayTimeout
(t *testing.T)
middleware/throttle_test.go:90
FunctionTestTree
(t *testing.T)
tree_test.go:12
FunctionTestTreeFindPattern
(t *testing.T)
tree_test.go:419
FunctionTestTreeMoar
(t *testing.T)
tree_test.go:156
FunctionTestTreeRegexMatchWholeParam
(t *testing.T)
tree_test.go:389
FunctionTestTreeRegexp
(t *testing.T)
tree_test.go:272
FunctionTestTreeRegexpRecursive
(t *testing.T)
tree_test.go:338
FunctionTestURLFormat
(t *testing.T)
middleware/url_format_test.go:11
FunctionTestURLFormatInSubRouter
(t *testing.T)
middleware/url_format_test.go:52
FunctionTestWalkInlineMiddlewaresAcrossSubrouter
(t *testing.T)
tree_test.go:527
FunctionTestWalkMiddlewaresAcrossGroupAndRoute
https://github.com/go-chi/chi/issues/750 Middlewares registered on a Group must still reach handlers defined on a Route() mounted inside that group.
tree_test.go:665
FunctionTestWalkRouteWithHandlerAndSubrouter
https://github.com/go-chi/chi/issues/830
tree_test.go:584
FunctionTestWalker
(t *testing.T)
tree_test.go:514
FunctionTestWrapWriterHTTP2
(t *testing.T)
middleware/middleware_test.go:22
FunctionTestXFF_FailClosedOnUnparseable
TestXFF_FailClosedOnUnparseable pins the fail-closed contract for the rightmost-untrusted XFF walk (PR #967 review issue #6, adam-p): if the walker en
middleware/client_ip_test.go:648
FunctionTestXFF_IPv6ZoneIDBypassesTrustedV6Prefix
TestXFF_IPv6ZoneIDBypassesTrustedV6Prefix demonstrates the same shape of gap for IPv6 trust prefixes: netip.Prefix.Contains returns false for any zone
middleware/client_ip_test.go:601
FunctionTestXFF_MultipleHeadersMerged
"Multiple XFF headers" attack — Go's http.Header.Get returns only the first value, but the security-relevant rightmost IP is in the LAST instance afte
middleware/client_ip_test.go:478
FunctionTestXFF_V4MappedIPv6BypassesTrustedV4Prefix
TestXFF_V4MappedIPv6BypassesTrustedV4Prefix demonstrates a gap in the rightmost-untrusted walker: netip.Prefix.Contains returns false when an IPv4-map
middleware/client_ip_test.go:559
FunctionTestXForwardForIP
(t *testing.T)
middleware/realip_test.go:35
FunctionTestXForwardForXRealIPPrecedence
(t *testing.T)
middleware/realip_test.go:68
FunctionTestXRealIP
(t *testing.T)
middleware/realip_test.go:11
MethodTrace
Trace adds the route `pattern` that matches a TRACE http method to execute the `handlerFn` http.HandlerFunc.
mux.go:197
MethodTrace
(pattern string, h http.HandlerFunc)
chi.go:106
FunctionURLFormat
URLFormat is a middleware that parses the url extension from a request path and stores it on the context as a string under the key `middleware.URLForm
middleware/url_format.go:46
MethodUnwrap
Unwrap returns the original proxied target.
middleware/wrap_writer.go:63
MethodUnwrap
()
middleware/wrap_writer.go:134
MethodUnwrap
()
middleware/compress.go:386
MethodUpdate
(w http.ResponseWriter, r *http.Request)
_examples/todos-resource/users.go:42
← previousnext →301–400 of 435, ranked by callers