From 3194260c05e9579e00f331e88b3c27ef5b299afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Mej=C3=ADas=20Rodr=C3=ADguez?= Date: Fri, 23 Aug 2019 13:14:49 -0400 Subject: [PATCH] Remove else statement with single return sentence --- client/portainerTypes.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/portainerTypes.go b/client/portainerTypes.go index 359a29f..0e421b5 100644 --- a/client/portainerTypes.go +++ b/client/portainerTypes.go @@ -47,9 +47,8 @@ type GenericError struct { func (e *GenericError) Error() string { if e.Details != "" { return fmt.Sprintf("%s: %s", e.Err, e.Details) - } else { - return fmt.Sprintf("%s", e.Err) } + return fmt.Sprintf("%s", e.Err) } // AuthenticateUserRequest represents the body of a request to POST /auth