Enable prealloc linter

This will give us nice little performance gains in some code paths.

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
Milos Gajdos
2023-09-03 22:41:51 +01:00
parent a2e65220ae
commit 59fd8656ac
10 changed files with 20 additions and 12 deletions

View File

@@ -441,6 +441,7 @@ func (app *App) register(routeName string, dispatch dispatchFunc) {
// configureEvents prepares the event sink for action.
func (app *App) configureEvents(configuration *configuration.Configuration) {
// Configure all of the endpoint sinks.
// nolint:prealloc
var sinks []events.Sink
for _, endpoint := range configuration.Notifications.Endpoints {
if endpoint.Disabled {