Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 86f3788

Browse files
committed
Preallocate slice with capacitiy
1 parent 6958dd0 commit 86f3788

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internals/secrethub/service_gcp_init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func (l *gcpServiceAccountOptionLister) Options() ([]ui.Option, bool, error) {
216216
return nil, false, gcp.HandleError(err)
217217
}
218218

219-
var options []ui.Option
219+
options := make([]ui.Option, 0, len(resp.Accounts))
220220
for _, account := range resp.Accounts {
221221
if err := api.ValidateGCPServiceAccountEmail(account.Email); err != nil {
222222
continue

0 commit comments

Comments
 (0)