diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-15 16:25:35 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-15 16:25:35 -0500 |
commit | 7675ebe9567bd7cae4306f484e3677bf88ba8b55 (patch) | |
tree | abe46762eb9b9a07b0daae0268148c9d76e9fb13 /ezfiw.go | |
parent | 3744c70711bce0ab92cc47d7fa9a58f7882cc1e5 (diff) |
rename files
Diffstat (limited to 'ezfiw.go')
-rw-r--r-- | ezfiw.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ezfiw.go b/ezfiw.go new file mode 100644 index 0000000..0143f48 --- /dev/null +++ b/ezfiw.go @@ -0,0 +1,28 @@ +package libfastimport + +import ( + "strconv" +) + +type ezfiw struct { + fiw *FIWriter + err error +} + +func (e *ezfiw) WriteLine(a ...interface{}) { + if e.err == nil { + e.err = e.fiw.WriteLine(a...) + } +} + +func (e *ezfiw) WriteData(data []byte) { + if e.err == nil { + e.err = e.fiw.WriteData(data) + } +} + +func (e *ezfiw) WriteMark(idnum int) { + if e.err == nil { + e.err = e.fiw.WriteLine("mark", ":"+strconv.Itoa(idnum)) + } +} |