Add Execute interface to pcsdk commands

This commit is contained in:
Erik
2023-04-25 12:55:00 +02:00
parent d00d03b0cc
commit a7ae121750
4 changed files with 73 additions and 79 deletions

View File

@ -5,7 +5,7 @@ import (
"net/netip"
"github.com/google/uuid"
pcsdk "github.com/thefeli73/polemos/commands"
"github.com/thefeli73/polemos/pcsdk"
"github.com/thefeli73/polemos/state"
)
@ -13,7 +13,7 @@ func main() {
ip := netip.MustParseAddr("127.0.0.1")
uuid := uuid.MustParse("87e79cbc-6df6-4462-8412-85d6c473e3b1")
m := pcsdk.NewCommandCreate(5555, 6666, ip, state.CustomUUID(uuid))
m := pcsdk.NewCommandCreate(5555, 8080, ip, state.CustomUUID(uuid))
err := m.Execute("http://localhost:3000")
if err != nil {
fmt.Printf("error executing create command: %s\n", err)