コード例 #1
0
ファイル: acbuild.go プロジェクト: jaypipes/acbuild
func usageFunc(cmd *cobra.Command) error {
	subCommands := getSubCommands(cmd)
	commandUsageTemplate.Execute(tabOut, struct {
		Executable  string
		Cmd         *cobra.Command
		CmdFlags    *pflag.FlagSet
		SubCommands []*cobra.Command
	}{
		cliName,
		cmd,
		cmd.Flags(),
		subCommands,
	})
	tabOut.Flush()
	return nil
}