Skip to content

Commit

Permalink
fix: rename vars
Browse files Browse the repository at this point in the history
  • Loading branch information
zekisherif committed Oct 30, 2024
1 parent 028fecf commit 959a1fa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cli/cmd/resource_group_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/lacework/go-sdk/api"
)

func createResourceGroupV2(resourceType string) error {
func createResourceGroup(resourceType string) error {
questions := []*survey.Question{
{
Name: "name",
Expand Down
14 changes: 7 additions & 7 deletions cli/cmd/resource_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,19 +210,19 @@ func promptCreateResourceGroup() error {

switch group {
case "AWS":
return createResourceGroupV2("AWS")
return createResourceGroup("AWS")
case "AZURE":
return createResourceGroupV2("AZURE")
return createResourceGroup("AZURE")
case "GCP":
return createResourceGroupV2("GCP")
return createResourceGroup("GCP")
case "CONTAINER":
return createResourceGroupV2("CONTAINER")
return createResourceGroup("CONTAINER")
case "MACHINE":
return createResourceGroupV2("MACHINE")
return createResourceGroup("MACHINE")
case "OCI":
return createResourceGroupV2("OCI")
return createResourceGroup("OCI")
case "KUBERNETES":
return createResourceGroupV2("KUBERNETES")
return createResourceGroup("KUBERNETES")
default:
return errors.New("unknown resource group type")
}
Expand Down
6 changes: 3 additions & 3 deletions integration/resource_groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ func createResourceGroup(typ string, uid string) (string, error) {
return "", errors.New("non-zero exit code")
}

var resourceGroupV2Response api.ResourceGroupResponse
err = json.Unmarshal(out.Bytes(), &resourceGroupV2Response)
var resourceGroupResponse api.ResourceGroupResponse
err = json.Unmarshal(out.Bytes(), &resourceGroupResponse)
if err != nil {
return "", err
}
return resourceGroupV2Response.Data.ID(), nil
return resourceGroupResponse.Data.ID(), nil
}

func popResourceGroup() (string, error) {
Expand Down

0 comments on commit 959a1fa

Please sign in to comment.