remove unnecessary checks on slices

This commit is contained in:
Benjamin George Roberts committed 2022-09-23 18:04:30 +10:00
1 parent 09863b540d
commit c52e3aafe6
4 files changed
+24 -31

No files matched your search

+5 -6
View File
@@ -108,15 +108,14 @@ var listPreAuthKeys = &cobra.Command{
reusable = fmt.Sprintf("%v", key.GetReusable())
}
var aclTags string
aclTags := ""
if len(key.AclTags) > 0 {
for _, tag := range key.AclTags {
aclTags += "," + tag
}
aclTags = strings.TrimLeft(aclTags, ",")
for _, tag := range key.AclTags {
aclTags += "," + tag
}
aclTags = strings.TrimLeft(aclTags, ",")
tableData = append(tableData, []string{
key.GetId(),
key.GetKey(),