浏览代码

Make client.notfound error match errdefs.notfound

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 6 年之前
父节点
当前提交
5d8ece522b
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      client/errors.go

+ 2 - 4
client/errors.go

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