Replace the RegisterCommands/attachRegisteredCommands side-channel with WithCommands(), which wraps command registration functions as framework services. Commands now participate in the Core lifecycle via OnStartup, receiving the root cobra.Command through Core.App. Main() accepts variadic framework.Option so binaries pass their commands explicitly — no init(), no blank imports, no global state. Co-Authored-By: Virgil <virgil@lethean.io>
15 lines
614 B
Go
15 lines
614 B
Go
// Package gocmd provides Go development commands with enhanced output.
|
|
//
|
|
// Note: Package named gocmd because 'go' is a reserved keyword.
|
|
//
|
|
// Commands:
|
|
// - test: Run tests with colour-coded coverage summary
|
|
// - cov: Run tests with detailed coverage reports (HTML, thresholds)
|
|
// - fmt: Format code using goimports or gofmt
|
|
// - lint: Run golangci-lint
|
|
// - install: Install binary to $GOPATH/bin
|
|
// - mod: Module management (tidy, download, verify, graph)
|
|
// - work: Workspace management (sync, init, use)
|
|
//
|
|
// Sets MACOSX_DEPLOYMENT_TARGET to suppress linker warnings on macOS.
|
|
package gocmd
|