Token returns the current token.
()
| 388 | |
| 389 | // Token returns the current token. |
| 390 | func (d *Dispenser) Token() Token { |
| 391 | if d.cursor < 0 || d.cursor >= len(d.tokens) { |
| 392 | return Token{} |
| 393 | } |
| 394 | return d.tokens[d.cursor] |
| 395 | } |
| 396 | |
| 397 | // Reset sets d's cursor to the beginning, as |
| 398 | // if this was a new and unused dispenser. |
no outgoing calls
no test coverage detected