create an Annotation map of the right size to avoid resizing (#881)

This commit is contained in:
Gerardo Viedma
2018-03-23 10:29:07 +00:00
committed by Andrea Rosa
parent 6db99f6ecc
commit 0c47dbf26d

View File

@@ -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
}