cmd

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package cmd 提供 twist CLI 的命令定义、参数解析和配置加载。

ExitError 携带退出码的错误类型。退出码 1 为用户侧错误,2 为运行时错误。

Index

Constants

This section is empty.

Variables

View Source
var Version = "v1.0.0"

Functions

func Execute

func Execute() error

func GetExitCode

func GetExitCode(err error) int

Types

type ExitError

type ExitError struct {
	Code int
	Msg  string
	Err  error
}

ExitError 可携带退出码的错误类型。

func (*ExitError) Error

func (e *ExitError) Error() string

func (*ExitError) Unwrap

func (e *ExitError) Unwrap() error

Jump to

Keyboard shortcuts

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