Skip to content

Expose raw command interface #92

@iconoclasthero

Description

@iconoclasthero
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions