summaryrefslogtreecommitdiff
path: root/textproto
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-11-16 15:30:34 -0500
committerLuke Shumaker <lukeshu@lukeshu.com>2017-11-16 15:30:34 -0500
commitf0ffa10c863345ea3a9a301be035f78af175e17c (patch)
treeaba15bc1cf931c3a897af4abe505d9cacc5ce654 /textproto
parentc16e4c36d4f5f5f9d6d21f4644b9c38b61159c47 (diff)
use 'string' instead of '[]byte' for data
Diffstat (limited to 'textproto')
-rw-r--r--textproto/io.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/textproto/io.go b/textproto/io.go
index 9e8f532..1b6402b 100644
--- a/textproto/io.go
+++ b/textproto/io.go
@@ -70,12 +70,12 @@ func (fiw *FIWriter) WriteLine(a ...interface{}) error {
return err
}
-func (fiw *FIWriter) WriteData(data []byte) error {
+func (fiw *FIWriter) WriteData(data string) error {
err := fiw.WriteLine("data", len(data))
if err != nil {
return err
}
- _, err = fiw.w.Write(data)
+ _, err = io.WriteString(fiw.w, data)
return err
}