How do I nicely parse a list of program parameters and automate handling \"--help\" and/or \"--version\" (such as \"program [-d value] [--abc] [FILE1]\") in Go?
program [-d value] [--abc] [FILE1]
I think what you want is docopt. I'll just refer you to an earlier answer I posted for the details.