diff options
author | Julien Dessaux | 2024-05-29 23:08:24 +0200 |
---|---|---|
committer | Julien Dessaux | 2024-05-29 23:08:24 +0200 |
commit | 860984057d496999949f7b5680997a25b6c660c3 (patch) | |
tree | 32653e3f8e89464167d2ae3918a59a40364e020d /golang/cmd | |
parent | [golang] fixed golang api client design mistakes (diff) | |
download | spacetraders-860984057d496999949f7b5680997a25b6c660c3.tar.gz spacetraders-860984057d496999949f7b5680997a25b6c660c3.tar.bz2 spacetraders-860984057d496999949f7b5680997a25b6c660c3.zip |
[golang] added ships first api calls
Diffstat (limited to 'golang/cmd')
-rw-r--r-- | golang/cmd/spacetraders/main.go | 6 |
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 } |