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 {
|
func (n *NotificationService) Run(ctx context.Context) error {
|
||||||
go n.runEventsHandlerLoop(ctx)
|
go n.runEventsHandlerLoop(ctx)
|
||||||
|
|
||||||
select {
|
<-ctx.Done()
|
||||||
case <-ctx.Done():
|
|
||||||
log.Infof("notification service exiting")
|
log.Infof("notification service exiting")
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ func (n *NotificationService) runEventsHandler(ctx context.Context) error {
|
||||||
if err := m.Lock(ctx); err != nil {
|
if err := m.Lock(ctx); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer m.Unlock(ctx)
|
defer func() { _ = m.Unlock(ctx) }()
|
||||||
|
|
||||||
resp, err := n.runserviceClient.GetRunEvents(ctx, "")
|
resp, err := n.runserviceClient.GetRunEvents(ctx, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue