go/tests
Snider afc235796f feat: Command DTO + Cli surface — AX-native CLI primitives
Command is now a DTO with no root/child awareness:
- Path-based registration: c.Command("deploy/to/homelab", handler)
- Description is an i18n key derived from path: cmd.deploy.to.homelab.description
- Lifecycle: Run(), Start(), Stop(), Restart(), Reload(), Signal()
- All return core.Result — errors flow through Core internally
- Parent commands auto-created from path segments

Cli is now a surface layer that reads from Core's command registry:
- Resolves os.Args to command path
- Parses flags into Options (--port=8080 → Option{K:"port", V:"8080"})
- Calls command action with parsed Options
- Banner and help use i18n

Old Clir code preserved in tests/testdata/cli_clir.go.bak for reference.

211 tests, 77.5% coverage.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-20 12:08:19 +00:00
..
testdata feat: Command DTO + Cli surface — AX-native CLI primitives 2026-03-20 12:08:19 +00:00
app_test.go test: rewrite test suite for AX primitives API 2026-03-20 08:42:38 +00:00
array_test.go test: rewrite test suite for AX primitives API 2026-03-20 08:42:38 +00:00
cli_test.go feat: Command DTO + Cli surface — AX-native CLI primitives 2026-03-20 12:08:19 +00:00
command_test.go feat: Command DTO + Cli surface — AX-native CLI primitives 2026-03-20 12:08:19 +00:00
config_test.go test: rewrite test suite for AX primitives API 2026-03-20 08:42:38 +00:00
core_test.go test: 200 tests, 50.2% coverage — Data, I18n, Fs, Log, Embed, Runtime 2026-03-20 10:49:33 +00:00
data_test.go test: 200 tests, 50.2% coverage — Data, I18n, Fs, Log, Embed, Runtime 2026-03-20 10:49:33 +00:00
drive_test.go test: rewrite test suite for AX primitives API 2026-03-20 08:42:38 +00:00
embed_test.go test: 200 tests, 50.2% coverage — Data, I18n, Fs, Log, Embed, Runtime 2026-03-20 10:49:33 +00:00
error_test.go test: 200 tests, 50.2% coverage — Data, I18n, Fs, Log, Embed, Runtime 2026-03-20 10:49:33 +00:00
fs_test.go test: rewrite test suite for AX primitives API 2026-03-20 08:42:38 +00:00
i18n_test.go test: 200 tests, 50.2% coverage — Data, I18n, Fs, Log, Embed, Runtime 2026-03-20 10:49:33 +00:00
ipc_test.go test: rewrite test suite for AX primitives API 2026-03-20 08:42:38 +00:00
lock_test.go test: rewrite test suite for AX primitives API 2026-03-20 08:42:38 +00:00
log_test.go test: 200 tests, 50.2% coverage — Data, I18n, Fs, Log, Embed, Runtime 2026-03-20 10:49:33 +00:00
options_test.go test: rewrite test suite for AX primitives API 2026-03-20 08:42:38 +00:00
runtime_test.go test: 200 tests, 50.2% coverage — Data, I18n, Fs, Log, Embed, Runtime 2026-03-20 10:49:33 +00:00
service_test.go test: rewrite test suite for AX primitives API 2026-03-20 08:42:38 +00:00
task_test.go test: rewrite test suite for AX primitives API 2026-03-20 08:42:38 +00:00