Skip to content

Commit

Permalink
fix: fix slice init length
Browse files Browse the repository at this point in the history
  • Loading branch information
cuishuang authored Oct 4, 2024
1 parent cf22fe3 commit f89a70d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/runtime/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func (s *StorageManager) ListNamespaces(ctx context.Context) ([]string, error) {
return nil, err
}

res := make([]string, len(nsList.Items))
res := make([]string, 0, len(nsList.Items))
for _, ns := range nsList.Items {
res = append(res, ns.Name)
}
Expand Down

0 comments on commit f89a70d

Please sign in to comment.