Twitter | Pretraživanje | |
Mike Fridman
Do you write CLIs in ? If you need to reach for a framework, I'd suggest checking out.. - Simple API surface - No global state - Nice structural foundation for long term maintenance. Check out the objectctl example. Great job
Flags-first package for configuration. Contribute to peterbourgon/ff development by creating an account on GitHub.
GitHub GitHub @github
Reply Retweet Označi sa "sviđa mi se" More
ian molee 1. velj
Odgovor korisniku/ci @_mfridman @peterbourgon
I do, but still end up using no framework. Peter's commitment to reasoned simplicity resonates with me though so I really should look at this again, so thanks for the reminder.
Reply Retweet Označi sa "sviđa mi se"
Mike Fridman 1. velj
Odgovor korisniku/ci @ianfoo @peterbourgon
cool. I've used most other frameworks, but found them bulky and API surface way too large, i.e., tries to do too much. on the flip side, at least for me, starting with a raw func main + a few flags + time ... the CLI grows and becomes hard to maintain as features grow.
Reply Retweet Označi sa "sviđa mi se"
Stephen Gutekanst 2. velj
Odgovor korisniku/ci @_mfridman @peterbourgon
Very nice, this looks super similar to a ~100 line snippet I regularly copy into my projects called commander (even more minimal than a dependency) which uses the std `flag` package and supports nested nested CLIs mirroring the `go` command.
Reply Retweet Označi sa "sviđa mi se"
Stephen Gutekanst 2. velj
Odgovor korisniku/ci @_mfridman @peterbourgon @srcgraph
I will probably publish this somewhere later with a better explanation, but we use it in the CLI here: And an example of how it gets used:
Reply Retweet Označi sa "sviđa mi se"