diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-22 22:04:14 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-22 22:13:31 -0500 |
commit | 3efa1fc8a98d2d90c204c7bd5a0e2519e1ac7745 (patch) | |
tree | fb78c0b98d24be8d1985af1187f0202c052363d1 /cmd.go | |
parent | f13250e6a926640c4d0ee858f84fcf8036d612aa (diff) |
split the parser up, and have read methods like write emethods
Diffstat (limited to 'cmd.go')
-rw-r--r-- | cmd.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 } |