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)
| 145 | // that are empty or not recognized will cause an error to |
| 146 | // be returned. |
| 147 | func (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 |
no test coverage detected