Help us shape the future of Go! Take the 2026 Go Developer Survey

cmd

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 41 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
	ErrStacksUnavailable = &ExitError{Code: 9}  // stacked PRs not available for this repository
	ErrModifyRecovery    = &ExitError{Code: 10} // modify session interrupted, recovery required
)

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 LinkCmd added in v0.0.2

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

func MergeCmd

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

MergeCmd builds the `gh stack merge` command.

func ModifyCmd added in v0.0.3

func ModifyCmd(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 SwitchCmd added in v0.0.2

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

func SyncCmd

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

func TopCmd

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

func TrunkCmd added in v0.0.5

func TrunkCmd(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