perf(app): add prealloc (#1843)

pull/1846/head
Sasha Melentyev 3 years ago committed by GitHub
parent f56b325a3d
commit d679466a7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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())
}

Loading…
Cancel
Save