Browse code

Make client.notfound error match errdefs.notfound

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/01/01 02:18:41
Showing 1 changed files
... ...
@@ -35,7 +35,7 @@ func ErrorConnectionFailed(host string) error {
35 35
 
36 36
 type notFound interface {
37 37
 	error
38
-	NotFound() bool // Is the error a NotFound error
38
+	NotFound()
39 39
 }
40 40
 
41 41
 // IsErrNotFound returns true if the error is a NotFound error, which is returned
... ...
@@ -52,9 +52,7 @@ type objectNotFoundError struct {
52 52
 	id     string
53 53
 }
54 54
 
55
-func (e objectNotFoundError) NotFound() bool {
56
-	return true
57
-}
55
+func (e objectNotFoundError) NotFound() {}
58 56
 
59 57
 func (e objectNotFoundError) Error() string {
60 58
 	return fmt.Sprintf("Error: No such %s: %s", e.object, e.id)