Unreachable code removed

This commit is contained in:
Radek Simko 2015-02-18 18:25:07 +00:00
parent e149a97658
commit 6c8dd9e8fa
2 changed files with 4 additions and 7 deletions

View File

@ -109,11 +109,9 @@ func (c *RemoteCommand) Run(args []string) int {
case !haveLocal && haveNonManaged: case !haveLocal && haveNonManaged:
// Enable remote state management // Enable remote state management
return c.enableRemoteState() return c.enableRemoteState()
default:
panic("unhandled case")
} }
return 0
panic("unhandled case")
} }
// disableRemoteState is used to disable remote state management, // disableRemoteState is used to disable remote state management,

View File

@ -213,10 +213,9 @@ func (c *AtlasRemoteClient) DeleteState() error {
return ErrInvalidAuth return ErrInvalidAuth
case http.StatusInternalServerError: case http.StatusInternalServerError:
return ErrRemoteInternal 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 { func (c *AtlasRemoteClient) url() *url.URL {