remove unnecessary checks on slices
This commit is contained in:
parent
09863b540d
commit
c52e3aafe6
4 changed files with 24 additions and 31 deletions
|
@ -234,10 +234,8 @@ func (key *PreAuthKey) toProto() *v1.PreAuthKey {
|
|||
protoKey.CreatedAt = timestamppb.New(*key.CreatedAt)
|
||||
}
|
||||
|
||||
if len(key.ACLTags) > 0 {
|
||||
for idx := range key.ACLTags {
|
||||
protoKey.AclTags[idx] = key.ACLTags[idx].Tag
|
||||
}
|
||||
for idx := range key.ACLTags {
|
||||
protoKey.AclTags[idx] = key.ACLTags[idx].Tag
|
||||
}
|
||||
|
||||
return &protoKey
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue