From d679466a7bd496b57560993c5ee282af3b25728b Mon Sep 17 00:00:00 2001 From: Sasha Melentyev Date: Sat, 26 Feb 2022 18:23:26 +0300 Subject: [PATCH] perf(app): add prealloc (#1843) --- app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.go b/app.go index 8418af429..aebd6c563 100644 --- a/app.go +++ b/app.go @@ -153,7 +153,7 @@ func (a *App) Stop() error { } func (a *App) buildInstance() (*registry.ServiceInstance, error) { - endpoints := make([]string, 0) //nolint:gomnd + endpoints := make([]string, 0, len(a.opts.endpoints)) for _, e := range a.opts.endpoints { endpoints = append(endpoints, e.String()) }