[#1598] golangci: Enable unparam linter
All checks were successful
DCO action / DCO (pull_request) Successful in 35s
Vulncheck / Vulncheck (pull_request) Successful in 1m6s
Build / Build Components (pull_request) Successful in 1m45s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m44s
Tests and linters / Staticcheck (pull_request) Successful in 1m59s
Tests and linters / gopls check (pull_request) Successful in 2m19s
Tests and linters / Run gofumpt (pull_request) Successful in 2m35s
Tests and linters / Lint (pull_request) Successful in 2m56s
Tests and linters / Tests with -race (pull_request) Successful in 3m48s
Tests and linters / Tests (pull_request) Successful in 3m58s
All checks were successful
DCO action / DCO (pull_request) Successful in 35s
Vulncheck / Vulncheck (pull_request) Successful in 1m6s
Build / Build Components (pull_request) Successful in 1m45s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m44s
Tests and linters / Staticcheck (pull_request) Successful in 1m59s
Tests and linters / gopls check (pull_request) Successful in 2m19s
Tests and linters / Run gofumpt (pull_request) Successful in 2m35s
Tests and linters / Lint (pull_request) Successful in 2m56s
Tests and linters / Tests with -race (pull_request) Successful in 3m48s
Tests and linters / Tests (pull_request) Successful in 3m58s
To drop unnecessary parameters and return values. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
4d5ae59a52
commit
fb928616cc
26 changed files with 123 additions and 155 deletions
|
@ -134,11 +134,8 @@ func (l *listener) Listen(ctx context.Context) {
|
|||
l.startOnce.Do(func() {
|
||||
l.wg.Add(1)
|
||||
defer l.wg.Done()
|
||||
if err := l.listen(ctx, nil); err != nil {
|
||||
l.log.Error(ctx, logs.EventCouldNotStartListenToEvents,
|
||||
zap.Error(err),
|
||||
)
|
||||
}
|
||||
|
||||
l.listen(ctx, nil)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -152,23 +149,17 @@ func (l *listener) ListenWithError(ctx context.Context, intError chan<- error) {
|
|||
l.startOnce.Do(func() {
|
||||
l.wg.Add(1)
|
||||
defer l.wg.Done()
|
||||
if err := l.listen(ctx, intError); err != nil {
|
||||
l.log.Error(ctx, logs.EventCouldNotStartListenToEvents,
|
||||
zap.Error(err),
|
||||
)
|
||||
l.sendError(ctx, intError, err)
|
||||
}
|
||||
|
||||
l.listen(ctx, intError)
|
||||
})
|
||||
}
|
||||
|
||||
func (l *listener) listen(ctx context.Context, intError chan<- error) error {
|
||||
func (l *listener) listen(ctx context.Context, intError chan<- error) {
|
||||
subErrCh := make(chan error)
|
||||
|
||||
go l.subscribe(subErrCh)
|
||||
|
||||
l.listenLoop(ctx, intError, subErrCh)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *listener) subscribe(errCh chan error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue