From e3b9fba388b77c4caadfba55e4b234014600af12 Mon Sep 17 00:00:00 2001 From: Andrew Sisley Date: Mon, 24 Jun 2024 15:26:07 -0400 Subject: [PATCH] Return slice of correct length Values are appended to this slice --- internal/db/collection_define.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/db/collection_define.go b/internal/db/collection_define.go index a8b9fe9abd..6eb8d9dddb 100644 --- a/internal/db/collection_define.go +++ b/internal/db/collection_define.go @@ -29,7 +29,7 @@ func (db *db) createCollections( ctx context.Context, newDefinitions []client.CollectionDefinition, ) ([]client.CollectionDefinition, error) { - returnDescriptions := make([]client.CollectionDefinition, len(newDefinitions)) + returnDescriptions := make([]client.CollectionDefinition, 0, len(newDefinitions)) existingDefinitions, err := db.getAllActiveDefinitions(ctx) if err != nil {