25 lines
442 B
Go
25 lines
442 B
Go
|
package autohotkey
|
||
|
|
||
|
import (
|
||
|
"go.digitalcircle.com.br/open/replaycli-go/api"
|
||
|
)
|
||
|
|
||
|
type Cli struct {
|
||
|
*api.ApiCli
|
||
|
}
|
||
|
|
||
|
func NewCli() *Cli {
|
||
|
ret := &Cli{ApiCli: api.NewApiCli()}
|
||
|
return ret
|
||
|
}
|
||
|
|
||
|
func (c *Cli) Test() (ret string, err error) {
|
||
|
err = c.HttpCli().JsonPost("/ipc/ahk/test", nil, &ret)
|
||
|
return ret, err
|
||
|
}
|
||
|
|
||
|
func (c *Cli) Do(data string) (ret string, err error) {
|
||
|
err = c.HttpCli().JsonPost("/ipc/ahk/do", data, &ret)
|
||
|
return ret, err
|
||
|
}
|