aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/history.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/history.go b/lib/history.go
new file mode 100644
index 0000000..abc081f
--- /dev/null
+++ b/lib/history.go
@@ -0,0 +1,13 @@
+package lib
+
+// History represents a list of elements ordered by time.
+type History interface {
+ // Add a new element to the history
+ Add(string)
+ // Get the next element in history
+ Next() string
+ // Get the previous element in history
+ Prev() string
+ // Reset the current location in history
+ Reset()
+}