cmd

package
v0.0.0-...-07920c1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "servergo",
	Short: "快速启动HTTP文件服务器",
	Long: `ServerGo 是一个简单的命令行工具,用于快速启动HTTP文件服务器,
类似于Python的http.server模块,但使用Go实现,提供更好的性能。`,
}

RootCmd 表示没有调用子命令时的基础命令

Functions

func Execute

func Execute()

Execute 添加所有子命令到根命令并执行

func FriendlyErrorMessage

func FriendlyErrorMessage(err error) string

FriendlyErrorMessage 将Cobra的标准错误消息转换为更友好的用户提示,支持国际化

func GetFriendlyThemeErrorMessage

func GetFriendlyThemeErrorMessage() string

GetFriendlyThemeErrorMessage 返回一个关于主题参数的友好错误消息

func UpdateCommandDescriptions

func UpdateCommandDescriptions()

UpdateCommandDescriptions 更新所有命令的描述为当前语言

func UpdateConfigTableHeaders

func UpdateConfigTableHeaders(t table.Writer)

UpdateConfigTableHeaders 更新配置表格的表头为当前语言

Types

This section is empty.

Jump to

Keyboard shortcuts

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