notification: fix linter errors

Fix errors reported by default golangci-lint linters
This commit is contained in:
Simone Gotti 2019-07-02 15:54:47 +02:00
parent f1908c3a16
commit e508993d93
2 changed files with 5 additions and 6 deletions

View File

@ -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
}

View File

@ -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 {