MCPcopy
hub / github.com/caddyserver/caddy / Map

Method Map

replacer.go:87–89  ·  view source on GitHub ↗

Map adds mapFunc to the list of value providers. mapFunc will be executed only at replace-time.

(mapFunc ReplacerFunc)

Source from the content-addressed store, hash-verified

85// Map adds mapFunc to the list of value providers.
86// mapFunc will be executed only at replace-time.
87func (r *Replacer) Map(mapFunc ReplacerFunc) {
88 r.providers = append(r.providers, mapFunc)
89}
90
91// Set sets a custom variable to a static value.
92func (r *Replacer) Set(variable string, value any) {

Callers 5

TestReplacerMapFunction · 0.80
addHTTPVarsToReplacerFunction · 0.80
ServeHTTPMethod · 0.80
EmitMethod · 0.80
makeArgsReplacerFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestReplacerMapFunction · 0.64