lib/history.go
raw| 1 | package lib |
| 2 | |
| 3 | // History represents a list of elements ordered by time. |
| 4 | type History interface { |
| 5 | // Add a new element to the history |
| 6 | Add(string) |
| 7 | // Get the next element in history |
| 8 | Next() string |
| 9 | // Get the previous element in history |
| 10 | Prev() string |
| 11 | // Get the last element in history |
| 12 | Last() string |
| 13 | // Reset the current location in history |
| 14 | Reset() |
| 15 | } |