1 Star 0 Fork 0

zhuchance / kubernetes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
help_command.go 639 Bytes
一键复制 编辑 原始数据 按行查看 历史
Jeff Grafton 提交于 2015-04-16 15:47 . Update Gingko to latest HEAD release
package main
import (
"flag"
"fmt"
)
func BuildHelpCommand() *Command {
return &Command{
Name: "help",
FlagSet: flag.NewFlagSet("help", flag.ExitOnError),
UsageCommand: "ginkgo help <COMAND>",
Usage: []string{
"Print usage information. If a command is passed in, print usage information just for that command.",
},
Command: printHelp,
}
}
func printHelp(args []string, additionalArgs []string) {
if len(args) == 0 {
usage()
} else {
command, found := commandMatching(args[0])
if !found {
complainAndQuit(fmt.Sprintf("Unknown command: %s", args[0]))
}
usageForCommand(command, true)
}
}
Go
1
https://gitee.com/meoom/kubernetes.git
git@gitee.com:meoom/kubernetes.git
meoom
kubernetes
kubernetes
v1.1.5-beta.0

搜索帮助