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

Method SetContext

caddyconfig/caddyfile/dispenser.go:474–479  ·  view source on GitHub ↗

SetContext sets a key-value pair in the context map.

(key string, value any)

Source from the content-addressed store, hash-verified

472
473// SetContext sets a key-value pair in the context map.
474func (d *Dispenser) SetContext(key string, value any) {
475 if d.context == nil {
476 d.context = make(map[string]any)
477 }
478 d.context[key] = value
479}
480
481// GetContext gets the value of a key in the context map.
482func (d *Dispenser) GetContext(key string) any {

Callers 1

parseMatcherDefinitionsFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected