Skip to content

Commit

Permalink
Add brackets to case to improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed Nov 20, 2023
1 parent 667bb61 commit 6195004
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions internal/core/cloud/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,22 +199,28 @@ func NewCloudInstance(commandExecutor utils.CommandExecutor, client HTTPClient)

switch provider {
case Azure:
cloudMetadata, err = NewAzureMetadata(client)
if err != nil {
return nil, err
{
cloudMetadata, err = NewAzureMetadata(client)
if err != nil {
return nil, err
}
}
case AWS:
awsMetadata, err := NewAWSMetadata(client)
if err != nil {
return nil, err
{
awsMetadata, err := NewAWSMetadata(client)
if err != nil {
return nil, err
}
cloudMetadata = NewAWSMetadataDto(awsMetadata)
}
cloudMetadata = NewAWSMetadataDto(awsMetadata)
case GCP:
gcpMetadata, err := NewGCPMetadata(client)
if err != nil {
return nil, err
{
gcpMetadata, err := NewGCPMetadata(client)
if err != nil {
return nil, err
}
cloudMetadata = NewGCPMetadataDto(gcpMetadata)
}
cloudMetadata = NewGCPMetadataDto(gcpMetadata)
}

cInst.Metadata = cloudMetadata
Expand Down

0 comments on commit 6195004

Please sign in to comment.