Move the command tree into internal/cli (closes #8)
check / check (push) Successful in 1m4s

cmd/simplexcalc/ now holds only main.go: it passes the version the
linker sets to cli.Main and exits with the status that returns. root.go
and run.go move to internal/cli with their comments, changed only to
take the version as a parameter. Main reads the process's arguments and
output; execute takes them as parameters so the new tests can check the
version line and the non-zero status of an unknown command. Commands,
flags, output, log lines and exit status are unchanged, and the
-X main.version flag in the Dockerfile still applies.

Model: opus-5-5
This commit is contained in:
clawbot
2026-09-28 23:34:51 +00:00
parent 16649e0f2f
commit 86863653f8
8 changed files with 103 additions and 21 deletions
+7
View File
@@ -0,0 +1,7 @@
package cli
// Execute is execute, exported for the external test package, which
// needs to supply the arguments and read the output.
//
//nolint:gochecknoglobals // a test seam, not mutable state.
var Execute = execute