go/tests/testdata
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
..
scantest test: 200 tests, 50.2% coverage — Data, I18n, Fs, Log, Embed, Runtime 2026-03-20 10:49:33 +00:00
cli_clir.go.bak feat: Command DTO + Cli surface — AX-native CLI primitives 2026-03-20 12:08:19 +00:00
test.txt feat: restructure Core as unified struct with DTO pattern 2026-03-18 09:12:29 +00:00