hotfix
This commit is contained in:
parent
48c7490ace
commit
d78bae8b43
@ -14,13 +14,13 @@ func Talk() *cli.Command {
|
|||||||
return &cli.Command{
|
return &cli.Command{
|
||||||
Name: "talk",
|
Name: "talk",
|
||||||
Usage: "talk with parrot",
|
Usage: "talk with parrot",
|
||||||
Action: templateAction,
|
Action: talkAction,
|
||||||
ArgsUsage: "send arg as message to parrot",
|
ArgsUsage: "send arg as message to parrot",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// templateAction logic for Template
|
// talkAction logic for Template
|
||||||
func templateAction(context context.Context, c *cli.Command) error {
|
func talkAction(context context.Context, c *cli.Command) error {
|
||||||
conn, err := common.GetSocketConnection(common.ParrotServiceSocketPath)
|
conn, err := common.GetSocketConnection(common.ParrotServiceSocketPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@ -11,11 +11,9 @@ var socketPath = common.ParrotServiceSocketPath
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
services.BaseService(socketPath, func(command string, conn net.Conn) {
|
services.BaseService(socketPath, func(command string, conn net.Conn) {
|
||||||
for range 2 {
|
_, err := conn.Write([]byte(command))
|
||||||
_, err := conn.Write([]byte(command + "\n"))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err.Error())
|
log.Println(err.Error())
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ package services
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
_ "embed"
|
_ "embed"
|
||||||
|
"errors"
|
||||||
|
"github.com/DariusKlein/kleinCommand/common"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user