forked from TrueCloudLab/distribution
Add a comment why prealloc linter is disabled when configuring endpoints
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
parent
1089800643
commit
823cd4a370
1 changed files with 4 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue