Add a comment why prealloc linter is disabled when configuring endpoints

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
Milos Gajdos 2023-09-03 23:33:20 +01:00
parent 1089800643
commit 823cd4a370
No known key found for this signature in database
GPG key ID: 01300E5E6D417439

View file

@ -441,6 +441,10 @@ 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.
// NOTE(milosgajdos): we are disabling the linter here as
// if an endpoint is disabled we continue with the evaluation
// of the next one so we do not know the exact size the slice
// should have at the time the iteration starts
// nolint:prealloc
var sinks []events.Sink
for _, endpoint := range configuration.Notifications.Endpoints {