polemos/cmd/examples/create/create.go

24 lines
542 B
Go
Raw Permalink Normal View History

package main
import (
"fmt"
"net/netip"
"github.com/google/uuid"
"github.com/thefeli73/polemos/pcsdk"
"github.com/thefeli73/polemos/state"
)
func main() {
2023-05-02 15:27:43 +02:00
proxy := pcsdk.BuildProxy(netip.MustParseAddrPort("127.0.0.1:14000"))
ip := netip.MustParseAddr("127.0.0.1")
uuid := uuid.MustParse("87e79cbc-6df6-4462-8412-85d6c473e3b1")
2023-05-02 15:27:43 +02:00
err := proxy.Create(5555, 8080, ip, state.CustomUUID(uuid))
if err != nil {
2023-04-19 16:00:07 +02:00
fmt.Printf("error executing create command: %s\n", err)
} else {
fmt.Println("executing create command completed")
}
}