cli

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitSuccess    = 0
	ExitValidation = 1
	ExitBlocking   = 2
	ExitConflict   = 3
	ExitProvider   = 4
	ExitUsage      = 64
)

Variables

This section is empty.

Functions

func New

func New(version string) *cobra.Command

func NewWithBuildInfo

func NewWithBuildInfo(info BuildInfo) *cobra.Command

Types

type BuildInfo

type BuildInfo struct {
	Version   string
	Commit    string
	BuildTime string
}

BuildInfo carries version metadata injected at build time via ldflags.

type ExitError

type ExitError struct {
	Code      int
	ErrorCode string
	Message   string
	JSON      bool
}

ExitError preserves a stable CLI exit status through Cobra.

func (*ExitError) Error

func (e *ExitError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL