MCPcopy
hub / github.com/go-chi/chi / Add

Method Add

context.go:152–155  ·  view source on GitHub ↗

Add will append a URL parameter to the end of the route param

(key, value string)

Source from the content-addressed store, hash-verified

150
151// Add will append a URL parameter to the end of the route param
152func (s *RouteParams) Add(key, value string) {
153 s.Keys = append(s.Keys, key)
154 s.Values = append(s.Values, value)
155}
156
157// contextKey is a value for use with context.WithValue. It's used as
158// a pointer so it fits in an interface{} without allocation. This technique

Callers 15

methodNotAllowedHandlerFunction · 0.80
TestSingleHandlerFunction · 0.80
TestRouteHeadersFunction · 0.80
TestXRealIPFunction · 0.80
TestXForwardForIPFunction · 0.80
TestInvalidIPFunction · 0.80
basicAuthFailedFunction · 0.80
TestRequestIDFunction · 0.80
SunsetFunction · 0.80
RequestIDFunction · 0.80

Calls

no outgoing calls

Tested by 15

TestSingleHandlerFunction · 0.64
TestRouteHeadersFunction · 0.64
TestXRealIPFunction · 0.64
TestXForwardForIPFunction · 0.64
TestInvalidIPFunction · 0.64
TestRequestIDFunction · 0.64
TestThrottleBacklogFunction · 0.64
TestThrottleMaximumFunction · 0.64