remove unnecessary checks on slices

This commit is contained in:
Benjamin George Roberts 2022-09-23 17:58:06 +10:00
parent 09863b540d
commit c52e3aafe6
4 changed files with 24 additions and 31 deletions

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(),