[golang] added ships first api calls
This commit is contained in:
parent
0d00bf9fd2
commit
860984057d
9 changed files with 164 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue