Replace all "stringly typed" fields with slice equivalents

and alter the Flag interface accordingly

Closes #415
This commit is contained in:
Dan Buch
2016-05-21 21:29:45 -04:00
parent 65357985c2
commit 81fcf706ea
11 changed files with 314 additions and 256 deletions

View File

@@ -3,6 +3,7 @@ package cli
import (
"fmt"
"io/ioutil"
"reflect"
"sort"
"strings"
)
@@ -69,7 +70,7 @@ func (c Command) Run(ctx *Context) (err error) {
return c.startApp(ctx)
}
if !c.HideHelp && (HelpFlag != BoolFlag{}) {
if !c.HideHelp && !reflect.DeepEqual(HelpFlag, BoolFlag{}) {
// append help to flags
c.Flags = append(
c.Flags,