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

`cmd/simplexcalc/` now holds only `main.go`, whose body is one call, `os.Exit(cli.Main(version))`, as the Go style guide requires. The command tree and the `run` and `version` commands moved unchanged into `internal/cli`, with tests for `version` and for an unknown command. Output streams, exit statuses and the `-X main.version` build flag are as before.

Disclosure: the comment in `execute` saying cobra has already printed the error is false, since the root command silences cobra's errors; it moved unchanged and is left for a follow-up.

Model: opus-5-5
This commit was merged in pull request #9.
This commit is contained in:
2026-09-29 01:51:34 +02:00
parent 16649e0f2f
commit 09a5caa8ab
8 changed files with 116 additions and 21 deletions
+3
View File
@@ -27,6 +27,9 @@ with no deprecation warning.
# Completed Steps
- 2026-09-28 Moved the command tree and the `run` and `version` commands
from `cmd/simplexcalc/` into `internal/cli`; `cmd/simplexcalc/main.go`
is now a single call to `cli.Main`
- 2026-09-26 Seeded from `go-template-repo` (renamed, its HTTP service
removed) and built the bot: `internal/calc` for the arithmetic,
`internal/simplex` for the chat client process and its WebSocket API,