From 860984057d496999949f7b5680997a25b6c660c3 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Wed, 29 May 2024 23:08:24 +0200 Subject: [golang] added ships first api calls --- golang/cmd/spacetraders/main.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'golang/cmd') diff --git a/golang/cmd/spacetraders/main.go b/golang/cmd/spacetraders/main.go index 5a4dc4a..42d43a6 100644 --- a/golang/cmd/spacetraders/main.go +++ b/golang/cmd/spacetraders/main.go @@ -82,5 +82,11 @@ func run( // ----- Update agent ------------------------------------------------------ agent, err := client.MyAgent() slog.Info("agent", "agent", agent, "err", err) + // ----- Get ships --------------------------------------------------------- + ships, err := client.MyShips() + err = client.Dock(&ships[0]) + slog.Info("dock", "ship", ships[0], "err", err) + err = client.Orbit(&ships[0]) + slog.Info("orbit", "ship", ships[0], "err", err) return nil } -- cgit v1.2.3