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

Method GetContextString

caddyconfig/caddyfile/dispenser.go:491–499  ·  view source on GitHub ↗

GetContextString gets the value of a key in the context map as a string, or an empty string if the key does not exist.

(key string)

Source from the content-addressed store, hash-verified

489// GetContextString gets the value of a key in the context map
490// as a string, or an empty string if the key does not exist.
491func (d *Dispenser) GetContextString(key string) string {
492 if d.context == nil {
493 return ""
494 }
495 if val, ok := d.context[key].(string); ok {
496 return val
497 }
498 return ""
499}
500
501// isNewLine determines whether the current token is on a different
502// line (higher line number) than the previous token. It handles imported

Callers 5

UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80
UnmarshalCaddyfileMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected