Accepting Arg string in App.Run

main
Jeremy Saenz 11 years ago
parent 0c14bbdc56
commit 04c645f6c6

@ -17,7 +17,8 @@ type Command struct {
type Action func(name string)
func (a App) Run(command string) {
func (a App) Run(args []string) {
command := args[1]
for _, c := range a.Commands {
if c.Name == command {
c.Action(command)

Loading…
Cancel
Save