News for hackers. Stuff that matters.
Re:Using Go for Scalable Operating System Analytics by jawher on Friday November 17, 2017 @02:27AM (#15719865)
Thanks for citing mow.cli [1] and glad you're liking it!

And you are spot-on regarding closures: it was a design choice made expressly for the purpose of being able to:

- scope command specific flag and args, instead of having one giant catch-all context map

- declare real and typed Go variables instead of something like context.String("--option")

- use the same pattern as the flag std package (flag.Bool, etc.) which I liked a lot

Disclaimer: I am the author of mow.cli

[1] https://github.com/jawher/mow.cli

Re:Using Go for Scalable Operating System Analytics by tetraodonpuffer on Friday November 17, 2017 @10:02AM (#15722432)
no problem and thanks for creating it! I also enjoyed how easy it is to extend it to support, say, enums: it was just a matter of adding flag interface support to my type and calling app.VarOpt to set it up, very straightforward