GetContextString gets the value of a key in the context map as a string, or an empty string if the key does not exist.
(key string)
| 489 | // GetContextString gets the value of a key in the context map |
| 490 | // as a string, or an empty string if the key does not exist. |
| 491 | func (d *Dispenser) GetContextString(key string) string { |
| 492 | if d.context == nil { |
| 493 | return "" |
| 494 | } |
| 495 | if val, ok := d.context[key].(string); ok { |
| 496 | return val |
| 497 | } |
| 498 | return "" |
| 499 | } |
| 500 | |
| 501 | // isNewLine determines whether the current token is on a different |
| 502 | // line (higher line number) than the previous token. It handles imported |
no outgoing calls
no test coverage detected