Scott,
The flag library stops parsing after it encounters the sequence "--" ( without quotes ). You could arrange you code so that you manually parse everything after the -- sequence for your custom flags.
Please consider this program that I've named flagcustom.go:
I have specified two required parameters -a and -b. If those command-line flags are present, I then look for any leftover arguments looking for "-info". If I find "-info" I use args+1 as a key and args+2 as a value.
Here are some samples of the output of flagcustom:
flagcustom
-a="": parameter a
-b="": parameter b
flagcustom -a red -b green
a is red
b is green
map args are map[]
flagcustom -a red -b green -info sky blue
flag provided but not defined: -info
Usage of flagcustom:
-a="": parameter a
-b="": parameter b
flagcustom -a red -b green -- -info sky blue
a is red
b is green
map args are map[%!V(string=sky):%!V(string=blue)]
flagcustom -a red -b green -- -info sky blue -info 2b "or not to be"
a is red
b is green
map args are map[%!V(string=sky):%!V(string=blue) %!V(string=2b):%!V(string=or not to be)]
Note that the custom parsing in the for-loop is far from perfect. It doesn't check to see if you have the correct number of arguments. I also used my own format similar to yours. You could examine each arg to see if the prefix is "-info:" and could then parse the key from the remainder.