Hi all, I realize that the flag package stops parsing os.Args[] once it 
finds a non "-" character. This means, if I invoke my program as:

$ ./myprog arg1 -d value

flag.Parse() will stop parsing the moment it sees arg1 and result in NArg() 
returning 2 instead of 1. 

Is there a recommended workaround to handle both $./myprog -d value arg1 
and $./myprog arg1 -d value correctly? 

Thanks for any suggestions.

Thanks,
Amit.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/d1399079-4589-454f-91d3-820a60aa239dn%40googlegroups.com.

Reply via email to