Skip to content

Commit b5bdc78

Browse files
author
Rahul Sharma
committed
fix linting failures
1 parent e0eaa41 commit b5bdc78

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

cloud/linode/instances.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ func (nc *nodeCache) refreshInstances(ctx context.Context, client client.Client)
8080

8181
// If running within VPC, find instances and store their ips
8282
vpcNodes := map[int][]string{}
83-
for _, vpcName := range Options.VPCNames {
84-
vpcName := strings.TrimSpace(vpcName)
83+
for _, name := range Options.VPCNames {
84+
vpcName := strings.TrimSpace(name)
8585
if vpcName == "" {
8686
continue
8787
}

cloud/linode/vpc.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ func validateVPCSubnetFlags() error {
185185
}
186186

187187
func resolveSubnetNames(client client.Client, vpcID int) ([]string, error) {
188-
var subnetNames []string
189-
188+
subnetNames := []string{}
190189
for _, subnetID := range Options.SubnetIDs {
191190
subnet, err := client.GetVPCSubnet(context.TODO(), vpcID, subnetID)
192191
if err != nil {
@@ -208,8 +207,7 @@ func validateAndSetVPCSubnetFlags(client client.Client) error {
208207
Mu.Lock()
209208
defer Mu.Unlock()
210209

211-
var vpcNames []string
212-
210+
vpcNames := []string{}
213211
for idx, vpcID := range Options.VPCIDs {
214212
vpc, err := client.GetVPC(context.TODO(), vpcID)
215213
if err != nil {

0 commit comments

Comments
 (0)