Set sets a custom variable to a static value.
(variable string, value any)
| 90 | |
| 91 | // Set sets a custom variable to a static value. |
| 92 | func (r *Replacer) Set(variable string, value any) { |
| 93 | r.mapMutex.Lock() |
| 94 | r.static[variable] = value |
| 95 | r.mapMutex.Unlock() |
| 96 | } |
| 97 | |
| 98 | // Get gets a value from the replacer. It returns |
| 99 | // the value and whether the variable was known. |
no outgoing calls