cmd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotInStack   = &ExitError{Code: 2} // branch/stack not found
	ErrConflict     = &ExitError{Code: 3} // rebase conflict
	ErrAPIFailure   = &ExitError{Code: 4} // GitHub API error
	ErrInvalidArgs  = &ExitError{Code: 5} // invalid arguments or flags
	ErrDisambiguate = &ExitError{Code: 6} // multiple stacks/remotes, can't auto-select
	ErrRebaseActive = &ExitError{Code: 7} // rebase already in progress
	ErrLockFailed   = &ExitError{Code: 8} // could not acquire stack file lock
)

Typed exit errors for programmatic detection by scripts and agents.

View Source
var ErrSilent = &ExitError{Code: 1}

ErrSilent indicates the error has already been printed to the user. Execute() will exit with code 1 but will not print the error again.

View Source
var Version = "dev"

Version is the current version of gh-stack. In release builds, this is overridden at build time via ldflags (see .github/workflows/release.yml). The "dev" default indicates a local development build.

Functions

func AddCmd

func AddCmd(cfg *config.Config) *cobra.Command

func AliasCmd

func AliasCmd(cfg *config.Config) *cobra.Command

func BottomCmd

func BottomCmd(cfg *config.Config) *cobra.Command

func CheckoutCmd

func CheckoutCmd(cfg *config.Config) *cobra.Command

func DownCmd

func DownCmd(cfg *config.Config) *cobra.Command

func Execute

func Execute()

func FeedbackCmd

func FeedbackCmd(cfg *config.Config) *cobra.Command

func InitCmd

func InitCmd(cfg *config.Config) *cobra.Command

func MergeCmd

func MergeCmd(cfg *config.Config) *cobra.Command

func PushCmd

func PushCmd(cfg *config.Config) *cobra.Command

func RebaseCmd

func RebaseCmd(cfg *config.Config) *cobra.Command

func RootCmd

func RootCmd() *cobra.Command

func SubmitCmd

func SubmitCmd(cfg *config.Config) *cobra.Command

func SyncCmd

func SyncCmd(cfg *config.Config) *cobra.Command

func TopCmd

func TopCmd(cfg *config.Config) *cobra.Command

func UnstackCmd

func UnstackCmd(cfg *config.Config) *cobra.Command

func UpCmd

func UpCmd(cfg *config.Config) *cobra.Command

func ViewCmd

func ViewCmd(cfg *config.Config) *cobra.Command

Types

type ExitError

type ExitError struct {
	Code int
}

ExitError is returned by commands to indicate a specific exit code. Execute() extracts the code and passes it to os.Exit.

func (*ExitError) Error

func (e *ExitError) Error() string

func (*ExitError) Is

func (e *ExitError) Is(target error) bool

Jump to

Keyboard shortcuts

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