Skip to content

Commit

Permalink
style: fix prettier and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hskiba committed Mar 27, 2024
1 parent eb8d35f commit c798154
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The application accepts several flags:
- `-p, --port`: port to listen on (default is `3000`).
- `--path-prefix`: path prefix for the application (default is `/`).
- `--provider`: cloud provider to use (default is `aws`).
- `--resource-group-name`: name of the resource group to use (required for
- `--resource-group-name`: name of the resource group to use (required for
Azure).
- `--subscription-id`: subscription ID to use (required for Azure).
- `-t, --tags`: filter instances using tag key-value pairs (e.g.,
Expand Down
5 changes: 1 addition & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@ func (a *AzureProvider) GetServerBank(tags map[string]string) (*ServerBank, erro
// Get the instance view for the VM to access its status
instanceView, err := a.vmClient.InstanceView(ctx, resourceGroupName, *vm.Name, nil)
if err != nil {
fmt.Errorf("failed to get instance view: %v", err)
continue
return nil, fmt.Errorf("failed to get instance view: %v", err)
}

var status string
Expand Down Expand Up @@ -346,7 +345,6 @@ func normalizeStatus(azureStatus string) string {

// PowerOnAll powers on all the servers in the bank and updates their statuses.
func (h *AWSProvider) PowerOnAll(sb *ServerBank) error {

var instanceIDs []string
for _, server := range sb.Servers {
if server.Status == string(types.InstanceStateNameStopped) {
Expand Down Expand Up @@ -377,7 +375,6 @@ func (h *AWSProvider) PowerOnAll(sb *ServerBank) error {

// PowerOffAll powers off all the servers in the bank and updates their statuses.
func (h *AWSProvider) PowerOffAll(sb *ServerBank) error {

var instanceIDs []string
for _, server := range sb.Servers {
if server.Status == string(types.InstanceStateNameRunning) {
Expand Down

0 comments on commit c798154

Please sign in to comment.