fixed dispatch method

This commit is contained in:
Milarin 2024-02-09 22:16:08 +01:00
parent e308674337
commit 2b2f1648c1

View File

@ -7,11 +7,11 @@ import (
) )
func (i *Instance) Dispatch(cmd string) (io.ReadCloser, error) { func (i *Instance) Dispatch(cmd string) (io.ReadCloser, error) {
return readSocketRaw(i.SocketPath(), strings.NewReader(cmd)) return readSocketRaw(i.SocketPath(), strings.NewReader(fmt.Sprintf("dispatch %s", cmd)))
} }
func (i *Instance) DispatchExpectOK(cmd string) error { func (i *Instance) DispatchExpectOK(cmd string) error {
str, err := readSocketString(i.SocketPath(), strings.NewReader(cmd)) str, err := readSocketString(i.SocketPath(), strings.NewReader(fmt.Sprintf("dispatch %s", cmd)))
if err != nil { if err != nil {
return err return err
} }