diff --git a/command/remote.go b/command/remote.go index d9a773704a..6567d80371 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 6d7e221647..468adca564 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 {