mirror of
https://github.com/issadarkthing/gomu.git
synced 2025-04-25 13:48:49 +08:00
run make format
This commit is contained in:
parent
7a65a0a08e
commit
a267f0f3e0
@ -6,7 +6,6 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
func TestGetFn(t *testing.T) {
|
||||
|
||||
c := newCommand()
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAddHook(t *testing.T) {
|
||||
|
||||
|
||||
h := NewEventHook()
|
||||
|
||||
h.AddHook("a", nil)
|
||||
@ -31,7 +31,7 @@ func TestRunHooks(t *testing.T) {
|
||||
h := NewEventHook()
|
||||
x := 0
|
||||
|
||||
for i := 0; i < 100; i ++ {
|
||||
for i := 0; i < 100; i++ {
|
||||
h.AddHook("sample", func() {
|
||||
x++
|
||||
})
|
||||
|
@ -69,7 +69,7 @@ func (_ *Invidious) GetSuggestions(prefix string) ([]string, error) {
|
||||
return suggestions, nil
|
||||
}
|
||||
|
||||
// GetTrendingMusic fetch music trending based on region.
|
||||
// GetTrendingMusic fetch music trending based on region.
|
||||
// Region (ISO 3166 country code) can be provided in the argument.
|
||||
func (i *Invidious) GetTrendingMusic(region string) ([]YoutubeVideo, error) {
|
||||
|
||||
@ -83,7 +83,7 @@ func (i *Invidious) GetTrendingMusic(region string) ([]YoutubeVideo, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return yt, nil
|
||||
return yt, nil
|
||||
}
|
||||
|
||||
// getRequest is a helper function that simplifies GET request and parsing the
|
||||
|
@ -218,7 +218,6 @@ func (p *Player) Skip() {
|
||||
p.execSongFinish(p.currentSong)
|
||||
}
|
||||
|
||||
|
||||
// GetPosition returns the current position of audio file.
|
||||
func (p *Player) GetPosition() time.Duration {
|
||||
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/issadarkthing/gomu/player"
|
||||
"github.com/rivo/tview"
|
||||
)
|
||||
|
||||
// Prepares for test
|
||||
|
@ -94,7 +94,6 @@ func TestPushFront(t *testing.T) {
|
||||
|
||||
gomu.playlist.addAllToQueue(rapPlaylist)
|
||||
|
||||
|
||||
selSong, err := gomu.queue.deleteItem(2)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
|
@ -8,7 +8,6 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
func TestSetupHooks(t *testing.T) {
|
||||
|
||||
gomu := newGomu()
|
||||
|
@ -119,7 +119,7 @@ func TestEmbedLyric(t *testing.T) {
|
||||
}
|
||||
f.Close()
|
||||
|
||||
defer func(){
|
||||
defer func() {
|
||||
err := os.Remove(testFile)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user