Skip to content

Commit fc2aafc

Browse files
committed
chore(golangci-lint): fix lint violations
1 parent e8be32c commit fc2aafc

5 files changed

Lines changed: 9 additions & 7 deletions

File tree

pkg/commands/list/list.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@ func execute(c *cli.Context) error {
2929
} else {
3030
_, _ = color.New(color.Bold).Printf("%-55s", name)
3131
c := color.FgGreen
32-
if reg.Scope == azure.TenantScope {
32+
switch reg.Scope {
33+
case azure.TenantScope:
3334
c = color.FgHiGreen
34-
} else if reg.Scope == azure.SubscriptionScope {
35+
case azure.SubscriptionScope:
3536
c = color.FgHiBlue
36-
} else if reg.Scope == azure.ResourceGroupScope {
37+
case azure.ResourceGroupScope:
3738
c = color.FgHiMagenta
3839
}
40+
3941
_, _ = color.New(c).Printf("%s\n", string(reg.Scope))
4042
}
4143
}

resources/disk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (l DiskLister) List(ctx context.Context, o interface{}) ([]resource.Resourc
8888
client: client,
8989
Name: r.Name,
9090
Tags: r.Tags,
91-
CreationDate: ptr.Time(r.DiskProperties.TimeCreated.Time),
91+
CreationDate: ptr.Time(r.TimeCreated.Time),
9292
})
9393
}
9494

resources/security-alert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (l SecurityAlertsLister) List(ctx context.Context, o interface{}) ([]resour
106106
ID: *g.ID,
107107
Name: *g.Name,
108108
DisplayName: ptr.ToString(g.AlertDisplayName),
109-
Status: string(g.AlertProperties.Status),
109+
Status: string(g.Status),
110110
})
111111
}
112112

resources/snapshot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (l ComputeSnapshotLister) List(ctx context.Context, o interface{}) ([]resou
8888
client: client,
8989
Name: r.Name,
9090
Tags: r.Tags,
91-
CreationDate: ptr.Time(r.SnapshotProperties.TimeCreated.Time),
91+
CreationDate: ptr.Time(r.TimeCreated.Time),
9292
})
9393
}
9494

resources/subscription-role-assignment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (l *SubscriptionRoleAssignmentLister) List(ctx context.Context, o interface
127127
}
128128

129129
if _, ok := l.roleNameCache[t.Properties.RoleDefinitionID]; !ok {
130-
l.roleNameCache[t.Properties.RoleDefinitionID] = rel.RoleDefinition.Properties.RoleName
130+
l.roleNameCache[t.Properties.RoleDefinitionID] = rel.Properties.RoleName
131131
}
132132

133133
var principalName = ptr.String("unknown")

0 commit comments

Comments
 (0)