Hacker News new | ask | show | jobs
by ola 3885 days ago
It's using the standard `flag` package that comes with Go, as for why `flag` parses args this way I don't know.
2 comments

The go devs are aware of it, and adamant that this stuff is fine and they don't want to make the flag package "any more complex" since it's so easy to install a different one (nevermind that of course people are going to use the builtin one...). I find this absolutely ridiculous given how nonstandard it is in today's shell scripts; -flag is supposed to be interpreted as -f -l -a -g or -f "lag" depending on the -f argument.
i was thrilled when I learned that flag will also do --option=value format as well. it might even do --option value too - test it?