Formatting
This commit is contained in:
parent
4120b604ec
commit
ab6f1b7c3c
@ -27,7 +27,7 @@ func (c Command) Run(ctx *Context) error {
|
|||||||
// append help to flags
|
// append help to flags
|
||||||
c.Flags = append(
|
c.Flags = append(
|
||||||
c.Flags,
|
c.Flags,
|
||||||
BoolFlag{"help, h","show help"},
|
BoolFlag{"help, h", "show help"},
|
||||||
)
|
)
|
||||||
|
|
||||||
set := flagSet(c.Name, c.Flags)
|
set := flagSet(c.Name, c.Flags)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package cli
|
package cli
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
|
||||||
"errors"
|
"errors"
|
||||||
|
"flag"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
2
flag.go
2
flag.go
@ -184,7 +184,7 @@ func prefixedNames(fullName string) (prefixed string) {
|
|||||||
for i, name := range parts {
|
for i, name := range parts {
|
||||||
name = strings.Trim(name, " ")
|
name = strings.Trim(name, " ")
|
||||||
prefixed += prefixFor(name) + name
|
prefixed += prefixFor(name) + name
|
||||||
if i < len(parts) - 1 {
|
if i < len(parts)-1 {
|
||||||
prefixed += ", "
|
prefixed += ", "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ func TestParseMultiString(t *testing.T) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
}).Run([]string{"run", "--serve", "10"})
|
}).Run([]string{"run", "--serve", "10"})
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestParseMultiInt(t *testing.T) {
|
func TestParseMultiInt(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user