1
0
Fork 0

Add custom help function to command

This commit is contained in:
Brendan Le Glaunec 2019-12-02 17:34:06 +01:00 committed by Traefiker Bot
parent cf1ace3a73
commit 4cb9eec257
3 changed files with 82 additions and 10 deletions

View file

@ -25,7 +25,7 @@ func (f *FileLoader) GetFilename() string {
func (f *FileLoader) Load(args []string, cmd *Command) (bool, error) {
ref, err := flag.Parse(args, cmd.Configuration)
if err != nil {
_ = PrintHelp(os.Stdout, cmd)
_ = cmd.PrintHelp(os.Stdout)
return false, err
}