Files
simslim-mirror/go.mod
Interlap cf7080eb2f refactor: parse CLI with urfave/cli/v3
Replace the hand-rolled argument handling with the urfave/cli/v3 command
tree (the project's only dependency; no runtime transitive deps). This
removes the manual command switch, parseInterspersedFlags, jsonOption, and
extractDeviceSets in favor of the library's dispatch and flag parsing.

The command surface is unchanged: same commands, flags, arguments, JSON
output, error format (simslim: <msg>, exit 1), and unknown-command/usage
handling (exit 2). Flags may still appear before or after positional args
(v3 parses flags anywhere by default). --set is now a global flag inherited
by every subcommand, registered in its flag Action with last-wins,
comma-separated semantics. main still owns version, help, and the macOS
guard; the root usage text is preserved verbatim.

The command tree lives in app.go (newApp); each subcommand's Action is a
cmd* function in main.go reading flags via cmd.Bool/String and positionals
via cmd.Args(). Unit tests for the removed helpers are replaced by
app_test.go, which drives newApp through Run.
2026-07-22 13:16:41 +02:00

6 lines
87 B
AMPL

module github.com/mobai-app/simslim
go 1.26
require github.com/urfave/cli/v3 v3.10.1