diff options
author | Franck Cuny <franck@fcuny.net> | 2021-10-10 11:37:19 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-06-11 14:32:07 -0700 |
commit | 9039c3949bd9a74aa0dab8c57ec7020235ebb269 (patch) | |
tree | 3fdb1a28a6683c9305a69a16be6b49e354d32341 /tools | |
parent | mpd: add function `Close` to the player (diff) | |
download | world-9039c3949bd9a74aa0dab8c57ec7020235ebb269.tar.gz |
mpd: export the type Player
Diffstat (limited to 'tools')
-rw-r--r-- | tools/mpd-stats/internal/mpd/mpd.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/mpd-stats/internal/mpd/mpd.go b/tools/mpd-stats/internal/mpd/mpd.go index cebf2b2..5b57ee4 100644 --- a/tools/mpd-stats/internal/mpd/mpd.go +++ b/tools/mpd-stats/internal/mpd/mpd.go @@ -7,14 +7,14 @@ import ( "github.com/fhs/gompd/v2/mpd" ) -type player struct { +type Player struct { Watcher *mpd.Watcher Client *mpd.Client } -func NewPlayer(net string, addr string) (*player, error) { +func NewPlayer(net string, addr string) (*Player, error) { var ( - p player + p Player err error ) @@ -37,7 +37,7 @@ func NewPlayer(net string, addr string) (*player, error) { return &p, nil } -func (p *player) Close() error { +func (p *Player) Close() error { if err := p.Watcher.Close(); err != nil { return err } |