aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGibheer <gibheer@gmail.com>2015-03-24 21:02:13 +0100
committerGibheer <gibheer@gmail.com>2015-03-24 21:02:13 +0100
commitc69f4de8ce0ada8c99df1543039f188f845cf342 (patch)
tree89d78c33199c6f2e3aac38b6595865953ad0a80f
parent3e34c17449cef23b79d614fac8010ef557f2d144 (diff)
first parameter of args ignored
When prsing the flags, instead of parsing everything given, only the rest was parsed.
-rw-r--r--command.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/command.go b/command.go
index 71f7878..7b660ba 100644
--- a/command.go
+++ b/command.go
@@ -51,7 +51,7 @@ func (c *Command) eval(args []string) error {
return cmd.eval(rest)
}
}
- if err := c.Flags().Parse(rest); err != nil { return err }
+ if err := c.Flags().Parse(args); err != nil { return err }
if c.Run != nil {
c.Run(c, rest)
} else {