From 6c8dd9e8fa4f5f24ad727ab70ee33fcaba919ba1 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Wed, 18 Feb 2015 18:25:07 +0000 Subject: [PATCH] Unreachable code removed --- command/remote.go | 6 ++---- remote/atlas.go | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/command/remote.go b/command/remote.go index d9a773704..6567d8037 100644 --- a/command/remote.go +++ b/command/remote.go @@ -109,11 +109,9 @@ func (c *RemoteCommand) Run(args []string) int { case !haveLocal && haveNonManaged: // Enable remote state management return c.enableRemoteState() - - default: - panic("unhandled case") } - return 0 + + panic("unhandled case") } // disableRemoteState is used to disable remote state management, diff --git a/remote/atlas.go b/remote/atlas.go index 6d7e22164..468adca56 100644 --- a/remote/atlas.go +++ b/remote/atlas.go @@ -213,10 +213,9 @@ func (c *AtlasRemoteClient) DeleteState() error { return ErrInvalidAuth case http.StatusInternalServerError: return ErrRemoteInternal - default: - return fmt.Errorf("Unexpected HTTP response code %d", resp.StatusCode) } - return nil + + return fmt.Errorf("Unexpected HTTP response code %d", resp.StatusCode) } func (c *AtlasRemoteClient) url() *url.URL {