Moved to skeeto/scratch/misc
Last active
August 29, 2021 22:22
-
-
Save skeeto/d8b18fb4663f4a282e8c0db252a70faf to your computer and use it in GitHub Desktop.
quniq
Yeah, I really don't like Go's flag package, neither the API nor UI.
GNU-style options are just too good to give up, and all the other option
parsing packages I could find with better UIs still had poor APIs. So I
filled that gap with nullprogram.com/x/optparse. It's essentially a port
of my C library of the same name: https://github.com/skeeto/optparse
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks again for another great reply - and what a cool
reverse()
function! I also noticed that your passphrase code imports your ownoptparse
library. Theconfiguration struct
idea seems pretty straight forward.The
functional
version it easier for me to follow. The chaining concept looks really useful. I am going to experiment with it. OTOH, theinterface
version seems syntactically cumbersome and is harder for me to follow. I think ease of use is going to win out for me vs potential flexibility.