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

Method ReplaceKnown

replacer.go:154–157  ·  replacer.go::Replacer.ReplaceKnown

ReplaceKnown is like ReplaceAll but only replaces placeholders that are known (recognized). Unrecognized placeholders will remain in the output.

(input, empty string)

Source from the content-addressed store, hash-verified

152// placeholders that are known (recognized). Unrecognized
153// placeholders will remain in the output.
154func (r *Replacer) ReplaceKnown(input, empty string) string {
155 out, _ := r.replace(input, empty, false, false, false, nil)
156 return out
157}
158
159// ReplaceAll efficiently replaces placeholders in input with
160// their values. All placeholders are replaced in the output

Callers 15

TestReplacerReplaceKnownFunction · 0.95
doActiveHealthCheckMethod · 0.95
LoadConfigMethod · 0.95
ProvisionMethod · 0.80
ProvisionMethod · 0.80
ProvisionMethod · 0.80
makeTLSClientConfigMethod · 0.80
ProvisionMethod · 0.80
ProvisionMethod · 0.80
ProvisionMethod · 0.80
ProvisionMethod · 0.80
ProvisionMethod · 0.80

Calls 1

replaceMethod · 0.95

Tested by 2

TestReplacerReplaceKnownFunction · 0.76