From 0c47dbf26d0b9e4fa62410a199253755bc77cb23 Mon Sep 17 00:00:00 2001 From: Gerardo Viedma Date: Fri, 23 Mar 2018 10:29:07 +0000 Subject: [PATCH] create an Annotation map of the right size to avoid resizing (#881) --- api/agent/call.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/agent/call.go b/api/agent/call.go index 50dbf3733..0d8cffefc 100644 --- a/api/agent/call.go +++ b/api/agent/call.go @@ -137,7 +137,7 @@ func buildConfig(app *models.App, route *models.Route) models.Config { } func buildAnnotations(app *models.App, route *models.Route) models.Annotations { - ann := make(models.Annotations) + ann := make(models.Annotations, len(app.Annotations)+len(route.Annotations)) for k, v := range app.Annotations { ann[k] = v }