Put stores or updates an expression variable.
(key, value string)
| 35 | |
| 36 | // Put stores or updates an expression variable. |
| 37 | func (e *ExprVars) Put(key, value string) { |
| 38 | if e.vars == nil { |
| 39 | e.vars = make(map[string]string) |
| 40 | } |
| 41 | |
| 42 | if value != "" { |
| 43 | e.vars[key] = value |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | // Expand replace express with values. |
| 48 | func (e ExprVars) Expand(content string) string { |
no outgoing calls
no test coverage detected