From 11423e25b5db9e6345bf5df6a3a53289ab44ca3b Mon Sep 17 00:00:00 2001 From: Gibheer Date: Wed, 25 Mar 2015 20:12:41 +0100 Subject: fix go evt problem Go vet reported a problem with the interface of WriteTo returning an int. Line 13: method WriteTo(stream io.Writer) (int, error) should have signature WriteTo(io.Writer) (int64, error) To fix that problem, the interface was changed to return io.WriterTo, which uses int64 for return values. --- pem_marshal.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pem_marshal.go') diff --git a/pem_marshal.go b/pem_marshal.go index 14b3bd4..54ce1e0 100644 --- a/pem_marshal.go +++ b/pem_marshal.go @@ -10,6 +10,7 @@ type ( // This function writes the marshalled pem block to a writer and returns the // number of written bytes and eventual errors. -func (b marshalledPemBlock) WriteTo(stream io.Writer) (int, error) { - return stream.Write(b) +func (b marshalledPemBlock) WriteTo(stream io.Writer) (int64, error) { + numBytes, err := stream.Write(b) + return int64(numBytes), err } -- cgit v1.2.3-70-g09d2