Map adds mapFunc to the list of value providers. mapFunc will be executed only at replace-time.
(mapFunc ReplacerFunc)
| 85 | // Map adds mapFunc to the list of value providers. |
| 86 | // mapFunc will be executed only at replace-time. |
| 87 | func (r *Replacer) Map(mapFunc ReplacerFunc) { |
| 88 | r.providers = append(r.providers, mapFunc) |
| 89 | } |
| 90 | |
| 91 | // Set sets a custom variable to a static value. |
| 92 | func (r *Replacer) Set(variable string, value any) { |
no outgoing calls