From 2b70337c7762cc25cf763068c1e201328c94e30d Mon Sep 17 00:00:00 2001 From: "Arnaud Porterie (icecrime)" Date: Thu, 16 Jun 2016 17:00:32 -0700 Subject: [PATCH] Add nodeNotFound NotFound() Signed-off-by: Arnaud Porterie (icecrime) --- client/errors.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/errors.go b/client/errors.go index 46f4d1c..e026320 100644 --- a/client/errors.go +++ b/client/errors.go @@ -131,6 +131,11 @@ func (e nodeNotFoundError) Error() string { return fmt.Sprintf("Error: No such node: %s", e.nodeID) } +// NoFound indicates that this error type is of NotFound +func (e nodeNotFoundError) NotFound() bool { + return true +} + // IsErrNodeNotFound returns true if the error is caused // when a node is not found. func IsErrNodeNotFound(err error) bool {