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

Method GetString

replacer.go:111–114  ·  view source on GitHub ↗

GetString is the same as Get, but coerces the value to a string representation as efficiently as possible.

(variable string)

Source from the content-addressed store, hash-verified

109// GetString is the same as Get, but coerces the value to a
110// string representation as efficiently as possible.
111func (r *Replacer) GetString(variable string) (string, bool) {
112 s, found := r.Get(variable)
113 return ToString(s), found
114}
115
116// Delete removes a variable with a static value
117// that was created using Set.

Callers 6

TestHTTPVarReplacementFunction · 0.95
logRequestMethod · 0.80
funcPlaceholderMethod · 0.80
buildEnvMethod · 0.80
assertPlaceholderFunction · 0.80
assertPlaceholderAbsentFunction · 0.80

Calls 2

GetMethod · 0.95
ToStringFunction · 0.85

Tested by 3

TestHTTPVarReplacementFunction · 0.76
assertPlaceholderFunction · 0.64
assertPlaceholderAbsentFunction · 0.64