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

Method ReplaceOrErr

replacer.go:147–149  ·  view source on GitHub ↗

ReplaceOrErr is like ReplaceAll, but any placeholders that are empty or not recognized will cause an error to be returned.

(input string, errOnEmpty, errOnUnknown bool)

Source from the content-addressed store, hash-verified

145// that are empty or not recognized will cause an error to
146// be returned.
147func (r *Replacer) ReplaceOrErr(input string, errOnEmpty, errOnUnknown bool) (string, error) {
148 return r.replace(input, "", false, errOnEmpty, errOnUnknown, nil)
149}
150
151// ReplaceKnown is like ReplaceAll but only replaces
152// placeholders that are known (recognized). Unrecognized

Callers 12

parseLevelFunction · 0.95
ProvisionMethod · 0.95
ProvisionMethod · 0.95
ProvisionMethod · 0.95
ProvisionMethod · 0.95
ProvisionMethod · 0.95
parseAdminListenAddrFunction · 0.80
makeCertMagicConfigMethod · 0.80
CertificateAllowedMethod · 0.80
automaticHTTPSPhase1Method · 0.80

Calls 1

replaceMethod · 0.95

Tested by

no test coverage detected