From dde006ba6b929e5a57644334ac962a544cce1e78 Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Tue, 17 Nov 2015 16:12:11 -0800 Subject: [PATCH] registry/registry.go: simplify logical expression Signed-off-by: Alexander Morozov --- docs/registry.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/registry.go b/docs/registry.go index d018f922a..9c8666eac 100644 --- a/docs/registry.go +++ b/docs/registry.go @@ -221,9 +221,7 @@ func ContinueOnError(err error) bool { case *client.UnexpectedHTTPResponseError: return true case error: - if val := strings.Contains(err.Error(), strings.ToLower(syscall.ENOSPC.Error())); val { - return false - } + return !strings.Contains(err.Error(), strings.ToLower(syscall.ENOSPC.Error())) } // let's be nice and fallback if the error is a completely // unexpected one.