From b0a015c7cc83a443fb9233fd5d02346d824fc38b Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Sun, 10 Feb 2019 10:53:06 +0100 Subject: [PATCH] comments --- common/buf/copy.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/buf/copy.go b/common/buf/copy.go index ef2854751..87a9518e4 100644 --- a/common/buf/copy.go +++ b/common/buf/copy.go @@ -52,6 +52,7 @@ func (e readError) Inner() error { return e.error } +// IsReadError returns true if the error in Copy() comes from reading. func IsReadError(err error) bool { _, ok := err.(readError) return ok @@ -69,6 +70,7 @@ func (e writeError) Inner() error { return e.error } +// IsWriteError returns true if the error in Copy() comes from writing. func IsWriteError(err error) bool { _, ok := err.(writeError) return ok