summaryrefslogtreecommitdiff
path: root/cmd.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd.go')
-rw-r--r--cmd.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd.go b/cmd.go
index 7ba40e0..5e76708 100644
--- a/cmd.go
+++ b/cmd.go
@@ -4,6 +4,11 @@ import (
"git.lukeshu.com/go/libfastimport/textproto"
)
+type fiReader interface {
+ PeekLine() (string, error)
+ ReadLine() (string, error)
+}
+
type cmdClass int
const (
@@ -14,6 +19,7 @@ const (
)
type Cmd interface {
+ fiCmdRead(fiReader) (Cmd, error)
fiCmdWrite(*textproto.FIWriter) error
fiCmdClass() cmdClass
}