summaryrefslogtreecommitdiff
path: root/golang/cmd
diff options
context:
space:
mode:
authorJulien Dessaux2024-05-29 23:08:24 +0200
committerJulien Dessaux2024-05-29 23:08:24 +0200
commit860984057d496999949f7b5680997a25b6c660c3 (patch)
tree32653e3f8e89464167d2ae3918a59a40364e020d /golang/cmd
parent[golang] fixed golang api client design mistakes (diff)
downloadspacetraders-860984057d496999949f7b5680997a25b6c660c3.tar.gz
spacetraders-860984057d496999949f7b5680997a25b6c660c3.tar.bz2
spacetraders-860984057d496999949f7b5680997a25b6c660c3.zip
[golang] added ships first api calls
Diffstat (limited to '')
-rw-r--r--golang/cmd/spacetraders/main.go6
1 files changed, 6 insertions, 0 deletions
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
}