6 Commits

Author SHA1 Message Date
Michael Stapelberg
2c805ed001 refactor cobra command initialization to avoid stale state
Before this commit, we held onto *cobra.Command objects,
but that is not actually supported: after the first Execute(),
commands like updateCmd are stuck on the first-ever provided ctx.

Instead, turn command initialization into functions.

I only noticed this when trying to do two 'gok update'
from within the same test, where the fake build timestamp
is injected via the context (the timestamp was always the same).
2025-11-29 10:47:48 +01:00
Michael Stapelberg
a5127466af add gok ps — the output is still quite minimal
This command might become useful on its own in the future,
but for now mostly demonstrates how to use the gokapi package.
2025-02-22 09:05:31 +01:00
Michael Stapelberg
b8ffcd451e gok: add vm run subcommand
This is inspired by https://github.com/damdo/gokrazy-machine :)
2024-09-26 22:12:36 +02:00
Michael Stapelberg
fe8d59ca7d add gok push
related to https://github.com/gokrazy/gokrazy/issues/167
2023-02-19 15:03:41 +01:00
Michael Stapelberg
ca01203cad gok: add sbom subcommand 2023-01-29 21:55:42 +01:00
Michael Stapelberg
ce2433aa1a gok: move code to internal/gok 2023-01-29 19:30:23 +01:00