Currently using Codegangsta's Cli Library. I run a command like so:
myGoProgram arg1 arg2 arg3 --flag1 flag1arg
Running
app.Action = func(c *cli.Context) {
fmt.Println("Context: ", c.Args())
}
returns: [arg1 arg2 arg3 --flag1 flag1arg]
(c.Args()'s return type)
How can I access arg1
, arg2
, and arg3
, but not --flag1
or flag1arg
? Do I have to iterate through this array?