diff options
Diffstat (limited to 'src/errors/errors.go')
| -rw-r--r-- | src/errors/errors.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/errors/errors.go b/src/errors/errors.go index 8436f812a6..26db2d2bbf 100644 --- a/src/errors/errors.go +++ b/src/errors/errors.go @@ -70,3 +70,18 @@ type errorString struct { func (e *errorString) Error() string { return e.s } + +// ErrUnsupported indicates that a requested operation cannot be performed, +// because it is unsupported. For example, a call to os.Link when using a +// file system that does not support hard links. +// +// Functions and methods should not return this error but should instead +// return an error including appropriate context that satisfies +// +// errors.Is(err, errors.ErrUnsupported) +// +// either by directly wrapping ErrUnsupported or by implementing an Is method. +// +// Functions and methods should document the cases in which an error +// wrapping this will be returned. +var ErrUnsupported = New("unsupported operation") |
