pull/1546/head
Darien Raymond 2019-02-10 10:53:06 +01:00
parent 932e09a388
commit b0a015c7cc
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 2 additions and 0 deletions

View File

@ -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