Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillerv committed Aug 1, 2023
1 parent 7a97f8f commit 9bc06d9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions content/file_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package content_test

import (
"github.com/faiface/beep"
"github.com/jmillerv/go-dj/content"
"io"
"os"
"testing"

"github.com/faiface/beep"
"github.com/jmillerv/go-dj/content"
)

func TestLocalFile_Get(t *testing.T) {
Expand Down Expand Up @@ -38,6 +39,7 @@ func TestLocalFile_Get(t *testing.T) {
}
}

// nolint: TODO in github.com/jmillerv/go-dj/issues/16
func TestLocalFile_Play(t *testing.T) {
type fields struct {
Name string
Expand Down
10 changes: 8 additions & 2 deletions content/schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,19 @@ func (s *Scheduler) Stop(signal os.Signal, media Media) {
if signal == syscall.SIGTERM {
log.Info("Got kill signal. ")
if media != nil {
media.Stop()
err := media.Stop()
if err != nil {
log.WithError(err).Error("scheduler.Stop::error stopping media")
}
}
log.Info("Program will terminate now.")
os.Exit(0)
} else if signal == syscall.SIGINT {
if media != nil {
media.Stop()
err := media.Stop()
if err != nil {
log.WithError(err).Error("scheduler.Stop::error stopping media")
}
}
log.Info("Got CTRL+C signal")
if media != nil {
Expand Down

0 comments on commit 9bc06d9

Please sign in to comment.