1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Make client.notfound error match errdefs.notfound

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2018-12-31 18:18:41 +01:00
parent 421b66a486
commit 5d8ece522b
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -35,7 +35,7 @@ func ErrorConnectionFailed(host string) error {
type notFound interface {
error
NotFound() bool // Is the error a NotFound error
NotFound()
}
// IsErrNotFound returns true if the error is a NotFound error, which is returned
@ -52,9 +52,7 @@ type objectNotFoundError struct {
id string
}
func (e objectNotFoundError) NotFound() bool {
return true
}
func (e objectNotFoundError) NotFound() {}
func (e objectNotFoundError) Error() string {
return fmt.Sprintf("Error: No such %s: %s", e.object, e.id)