-
Notifications
You must be signed in to change notification settings - Fork 43
Expose raw command interface #92
Description
func (*Client) [Command](https://github.com/fhs/gompd/blob/v2.3.0/mpd/response.go#L18) [¶](https://pkg.go.dev/github.com/fhs/gompd/v2/mpd?utm_source=godoc#Client.Command)
func (c *[Client](https://pkg.go.dev/github.com/fhs/gompd/v2/mpd?utm_source=godoc#Client)) Command(format [string] (https://pkg.go.dev/builtin#string), args ...interface{}) *[Command](https://pkg.go.dev/github.com/fhs/gompd/v2/mpd?utm_source=godoc#Command)
Command returns a command that can be sent to MPD sever. It enables low-level access to MPD protocol and should be avoided if the user is not familiar with MPD protocol.Strings in args are automatically quoted so that spaces are preserved. Pass strings as Quoted type if this is not desired.
Unless I am missing something, although one can generate a properly-formatted command with Command, there's no way to actually use the gompd library to send it necessitating a separate direct connection to MPD? Or is it somehow included in CommandList (my testing suggests it doesnt)? If the documentation around what the point of Command is and how it's intended to be used could be clarified and/or add a way to send a command directly to mpd could be added, that would be helpful.