From 91e990f159b6b7dd72e39ddfa551454bbd03db28 Mon Sep 17 00:00:00 2001 From: Oleg Kovalov Date: Sun, 31 Oct 2021 09:46:55 +0100 Subject: [PATCH] Fix --- acmd.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/acmd.go b/acmd.go index 95d838b..fa079ba 100644 --- a/acmd.go +++ b/acmd.go @@ -84,9 +84,6 @@ func RunnerOf(cmds []Command, cfg Config) *Runner { } func (r *Runner) init() error { - if len(r.cmds) == 0 { - return errors.New("no cmds provided") - } if r.cfg.AppName == "" { r.cfg.AppName = os.Args[0] } @@ -116,7 +113,6 @@ func (r *Runner) init() error { cmds := r.cmds r.rootCmd = Command{ Name: "root", - Do: nopFunc, subcommands: cmds, } if err := validateCommand(r.rootCmd); err != nil {