diff --git a/pkg/manifest1/balancer.go b/pkg/manifest1/balancer.go index 3dbc1d9c06..35f941eb5f 100644 --- a/pkg/manifest1/balancer.go +++ b/pkg/manifest1/balancer.go @@ -102,7 +102,7 @@ func (mb ManifestBalancer) FirstPort() string { func (mb ManifestBalancer) Ports() []string { pp := mb.Entry.TCPPorts() - sp := make([]string, len(pp)) + sp := make([]string, 0, len(pp)) for _, p := range pp { sp = append(sp, strconv.Itoa(p.Balancer)) diff --git a/provider/aws/releases.go b/provider/aws/releases.go index b2c85bc102..55cb2ea131 100644 --- a/provider/aws/releases.go +++ b/provider/aws/releases.go @@ -872,7 +872,7 @@ func (p *Provider) resolveLinks(a *structs.App, m *manifest1.Manifest, r *struct } entry.Exports = make(map[string]string) - linkableEnvs := make([]string, len(entry.Environment)) + linkableEnvs := make([]string, 0, len(entry.Environment)) for _, env := range entry.Environment { linkableEnvs = append(linkableEnvs, fmt.Sprintf("%s=%s", env.Name, env.Value)) }