Move the CLI to urfave/cli v3 (closes #110)
check / check (push) Failing after 3s

Ported per the library's v2-to-v3 migration guide: the app is a root
cli.Command, actions take a context and the command, and flag environment
variables become value sources. -v, -q and the version flag are local so,
as before, only the commands defining them accept them. ErrWriter is
stdout so usage errors print with their help, as before. The action's
context reaches the manifest download in check, export and list. testify
rises to v1.12.1, which v3 requires; the urfave_cli_no_docs build tag,
which v3 lacks, is dropped. v3 no longer refuses a flag given under two
names, so -v --verbose gives debug output; the test pinning the refusal
becomes a TestVerboseCount case.

Model: opus-5-5
This commit is contained in:
2026-10-04 18:36:04 +00:00
parent 9bb0ab3a03
commit ccd018aef0
15 changed files with 220 additions and 240 deletions
+1 -3
View File
@@ -12,9 +12,7 @@ main() {
# empty constant.
version="$(git describe --tags --always --dirty 2>/dev/null || true)"
[ -n "$version" ] || version="unknown"
go build -tags urfave_cli_no_docs \
-ldflags "-X main.Gitrev=$version" \
-o bin/mfer ./cmd/mfer
go build -ldflags "-X main.Gitrev=$version" -o bin/mfer ./cmd/mfer
}
main "$@"