func main() { // check if acbuild is executed with a multicall command multicall.MaybeExec() cmdAcbuild.SetUsageFunc(usageFunc) // Make help just show the usage cmdAcbuild.SetHelpTemplate(`{{.UsageString}}`) cmdAcbuild.Execute() os.Exit(cmdExitCode) }
func main() { // check if acbuild is executed with a multicall command multicall.MaybeExec() cmdAcbuild.SetUsageFunc(func(cmd *cobra.Command) error { tabOut := new(tabwriter.Writer) tabOut.Init(os.Stdout, 0, 8, 1, '\t', 0) commandUsageTemplate.Execute(tabOut, cmd) tabOut.Flush() return nil }) // Make help just show the usage cmdAcbuild.SetHelpTemplate(`{{.UsageString}}`) cmdAcbuild.Execute() os.Exit(cmdExitCode) }
func init() { multicall.MaybeExec() }