remove unnecessary checks on slices
This commit is contained in:
parent
09863b540d
commit
c52e3aafe6
4 changed files with 24 additions and 31 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue