<#21 Upgrade to urfave/cli v3, spinners, build met...
# osctrl
g
#21 Upgrade to urfave/cli v3, spinners, build metadata Pull request opened by javuto Upgrade to urfave/cli v3, spinners, build metadata urfave/cli v2 → v3 Moves to
<http://github.com/urfave/cli/v3|github.com/urfave/cli/v3> v3.11.0
, matching osctrl. • Flag env vars use v3's source API:
EnvVars: []string{"X"}
→
Sources: cli.EnvVars("X")
, across all 13 flags. • Root becomes a
*cli.Command
instead of `*cli.App`;
Run
takes a
context.Context
. • Action signatures move to
func(context.Context, *cli.Command) error
. The
*cli.Context
argument was unused in all seven action functions, so no bodies changed. •
IntFlag
is still
int
-backed in v3, so
Configuration.Interval
and every
Destination
pointer are untouched. Spinners New
ui.go
ports the braille spinner from osctrl's
cmd/cli/shell_ui.go
— no new direct dependency. • Writes to stderr, so piping `enroll`/`remove` script output to a shell stays clean. • Enabled only when stderr is a TTY,
--verbose
is off, and
logFormat
is not
json
. The
service
daemon never spins. • Wraps the four server-retrieval calls and the extension download loop. Build metadata Follows osctrl-cli:
buildVersion
/
buildCommit
/
buildDate
vars in
main
,
--version/-v
printing
osctrld version=X commit=Y date=Z
. GoReleaser's four builds swap the dead
-X main.version
for the three
-X main.build*
flags, and the Makefile gains matching
BUILD_ARGS
. jmpsec/osctrld