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

Method ReplaceFunc

replacer.go:171–173  ·  view source on GitHub ↗

ReplaceFunc is the same as ReplaceAll, but calls f for every replacement to be made, in case f wants to change or inspect the replacement.

(input string, f ReplacementFunc)

Source from the content-addressed store, hash-verified

169// replacement to be made, in case f wants to change or inspect
170// the replacement.
171func (r *Replacer) ReplaceFunc(input string, f ReplacementFunc) (string, error) {
172 return r.replace(input, "", true, false, false, f)
173}
174
175func (r *Replacer) replace(input, empty string,
176 treatUnknownAsEmpty, errOnEmpty, errOnUnknown bool,

Callers 2

buildQueryStringFunction · 0.80
selectFileMethod · 0.80

Calls 1

replaceMethod · 0.95

Tested by

no test coverage detected