{"modulePath":"github.com/Fendix-app/Fendix/go","version":"v0.0.0-20261028135234-a02776cc5df9","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cli\n\nPackage cli holds tiny shared CLI utilities. Today it has one type: ExitError, which carries a custom exit code that the top-level main() catches to call os.Exit explicitly.\n\nWhy this exists: Cobra's RunE returning an error always exits 1 (or whatever cobra picks). The verify subcommand needs CI-script-friendly distinction between \"finding still present\" (exit 1, the build should fail) and \"verify couldn't tell\" (exit 2, the build should not fail on ambiguous results — the operator needs to investigate). Sprint 03 introduced the convention.\n\n## Functions\n\n```go\nfunc ExitWithCode(code int, msg string) error\n```\nExitWithCode returns an \\*ExitError suitable for returning from a Cobra RunE closure. Pair with main()'s \\`errors.As(err, \\*cli.ExitError)\\` catch to translate to a specific os.Exit code.\n\n## Types\n\n```go\ntype ExitError struct {\n\tCode    int\n\tMessage string\n}\n```\nExitError carries an explicit exit code from a Cobra RunE up to main(). It satisfies the error interface so RunE can return it without changing signatures, but main() inspects the type and honours Code via os.Exit.\n\n```go\nfunc (e *ExitError) Error() string\n```\nError returns the user-facing message, or a generic \"exit N\" if no message was supplied.\n\n","path":"github.com/Fendix-app/Fendix/go/internal/cli","name":"cli","synopsis":"Package cli holds tiny shared CLI utilities.","isRedistributable":true}
