Move the command tree into internal/cli (closes #8)
check / check (push) Successful in 1m40s
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user