From f0ffa10c863345ea3a9a301be035f78af175e17c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 16 Nov 2017 15:30:34 -0500 Subject: use 'string' instead of '[]byte' for data --- textproto/io.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'textproto') 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 } -- cgit v1.2.3