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 marked
local so that, as before, only the commands that define them accept them.
ErrWriter is stdout so usage errors print with their help, as before.
go mod tidy raises testify to v1.12.1, which v3 requires. The
urfave_cli_no_docs build tag is dropped; v3 has no such tag. v3 no longer
refuses a flag given under two of its names, so -v --verbose now gives
debug output, and the test that pinned the refusal becomes a
TestVerboseCount case. Help text follows v3's templates.

Model: opus-5-5
This commit is contained in:
2026-10-04 18:21:42 +00:00
parent 9bb0ab3a03
commit 5987f6edd1
15 changed files with 198 additions and 229 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ RUN version="${VERSION:-$(git describe --tags --always)}"; \
exit 1; \
fi; \
cd cmd/mfer && \
CGO_ENABLED=0 go build -tags urfave_cli_no_docs -ldflags "-X main.Gitrev=$version" -o /mfer .
CGO_ENABLED=0 go build -ldflags "-X main.Gitrev=$version" -o /mfer .
# Fail unless /mfer is statically linked: scratch has no C library to run it.
RUN ldd /mfer 2>&1 | grep -q 'not a dynamic executable'