cli

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SmallBanner = `
    ┌─┐┬  ┌─┐┬ ┬
    ├┤ │  │ ││││
    └  ┴─┘└─┘└┴┘
    %s - %s
`
)

定义Banner常量

Variables

This section is empty.

Functions

func PrintError

func PrintError(format string, args ...interface{})

PrintError 打印错误信息并退出

func PrintInfo

func PrintInfo(format string, args ...interface{})

PrintInfo 打印信息

func PrintSuccess

func PrintSuccess(format string, args ...interface{})

PrintSuccess 打印成功信息

func PrintWarning

func PrintWarning(format string, args ...interface{})

PrintWarning 打印警告信息

Types

type App

type App struct {
	// 应用名称
	Name string

	// 应用版本
	Version string

	// 应用描述
	Description string
	// contains filtered or unexported fields
}

App 表示CLI应用程序

func NewApp

func NewApp(name, version, description string) *App

NewApp 创建一个新的CLI应用程序

func NewFlowCLI

func NewFlowCLI() *App

NewFlowCLI 创建默认的Flow CLI应用程序

func (*App) AddCommand

func (a *App) AddCommand(cmd *cobra.Command)

AddCommand 添加一个命令到应用程序

func (*App) Run

func (a *App) Run() error

Run 运行CLI应用程序

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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