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> |
||
---|---|---|
.. | ||
client_daemon.go | ||
client_daemon_linux.go | ||
client_daemon_windows.go | ||
client_local_windows.go | ||
errors.go | ||
process_windows.go | ||
queue.go | ||
queue_test.go | ||
remote_daemon.go | ||
remote_daemon_linux.go | ||
remote_daemon_options.go | ||
remote_daemon_options_linux.go | ||
remote_daemon_windows.go | ||
remote_local.go | ||
types.go | ||
types_linux.go | ||
types_windows.go | ||
utils_linux.go | ||
utils_windows.go | ||
utils_windows_test.go |