notification: fix linter errors
Fix errors reported by default golangci-lint linters
This commit is contained in:
parent
f1908c3a16
commit
e508993d93
|
@ -68,9 +68,8 @@ func NewNotificationService(gc *config.Config) (*NotificationService, error) {
|
|||
func (n *NotificationService) Run(ctx context.Context) error {
|
||||
go n.runEventsHandlerLoop(ctx)
|
||||
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
log.Infof("notification service exiting")
|
||||
return nil
|
||||
}
|
||||
<-ctx.Done()
|
||||
log.Infof("notification service exiting")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ func (n *NotificationService) runEventsHandler(ctx context.Context) error {
|
|||
if err := m.Lock(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
defer m.Unlock(ctx)
|
||||
defer func() { _ = m.Unlock(ctx) }()
|
||||
|
||||
resp, err := n.runserviceClient.GetRunEvents(ctx, "")
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue