1616package player
1717
1818import (
19- "github.com/fhs/gompd/v2/mpd "
20- "github.com/pkg/errors"
19+ "fmt "
20+
2121 "sort"
2222 "sync"
2323 "time"
24+
25+ "github.com/fhs/gompd/v2/mpd"
2426)
2527
2628// Connector encapsulates functionality for connecting to MPD and watch for its changes
@@ -211,7 +213,7 @@ func (c *Connector) doConnect(connect, heartbeat bool) {
211213 if client , err = mpd .DialAuthenticated (c .mpdNetwork , c .mpdAddress , c .mpdPassword ); err == nil {
212214 connected = true
213215 } else {
214- err = errors .Errorf ("DialAuthenticated() failed: %v" , err )
216+ err = fmt .Errorf ("DialAuthenticated() failed: %v" , err )
215217 }
216218 }
217219
@@ -230,7 +232,7 @@ func (c *Connector) doConnect(connect, heartbeat bool) {
230232 go func () { c .chWatcherStart <- true }()
231233 } else {
232234 connected = false
233- err = errors .Errorf ("Status() after dial failed: %v" , err )
235+ err = fmt .Errorf ("Status() after dial failed: %v" , err )
234236 // Disconnect since we're not "fully connected"
235237 errCheck (client .Close (), "doConnect(): Close() failed" )
236238 }
@@ -243,7 +245,7 @@ func (c *Connector) doConnect(connect, heartbeat bool) {
243245 if status , err = client .Status (); err == nil {
244246 connected = true
245247 } else {
246- err = errors .Errorf ("Status() failed: %v" , err )
248+ err = fmt .Errorf ("Status() failed: %v" , err )
247249 }
248250 })
249251
0 commit comments