mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 14:39:24 +08:00
12 lines
216 B
Go
12 lines
216 B
Go
package readers
|
|
|
|
// ErrorReader wraps an error to return on Read
|
|
type ErrorReader struct {
|
|
Err error
|
|
}
|
|
|
|
// Read always returns the error
|
|
func (er ErrorReader) Read(p []byte) (n int, err error) {
|
|
return 0, er.Err
|
|
}
|