87a12421a9
Instead of having to create a bunch of custom error types that are doing nothing but wrapping another error in sub-packages, use a common helper to create errors of the requested type. e.g. instead of re-implementing this over and over: ```go type notFoundError struct { cause error } func(e notFoundError) Error() string { return e.cause.Error() } func(e notFoundError) NotFound() {} func(e notFoundError) Cause() error { return e.cause } ``` Packages can instead just do: ``` errdefs.NotFound(err) ``` Signed-off-by: Brian Goff <cpuguy83@gmail.com> |
||
---|---|---|
.. | ||
drivers | ||
local | ||
store | ||
testutils | ||
lcow_parser.go | ||
linux_parser.go | ||
parser.go | ||
validate.go | ||
validate_test.go | ||
validate_unix_test.go | ||
validate_windows_test.go | ||
volume.go | ||
volume_copy.go | ||
volume_test.go | ||
volume_unix.go | ||
volume_windows.go | ||
windows_parser.go |