fix: preallocate map size

This commit is contained in:
jon4hz
2023-02-24 22:03:13 +01:00
parent 1ff42991b3
commit 1693db3199

View File

@@ -587,7 +587,7 @@ func addHash(input string) string {
}
func getSecretsByKeys(secrets []models.SingleEnvironmentVariable) map[string]models.SingleEnvironmentVariable {
secretMapByName := make(map[string]models.SingleEnvironmentVariable)
secretMapByName := make(map[string]models.SingleEnvironmentVariable, len(secrets))
for _, secret := range secrets {
secretMapByName[secret.Key] = secret