Do you write CLIs in #golang?
If you need to reach for a framework, I'd suggest checking out..
https://github.com/peterbourgon/ff/tree/master/ffcli …
- Simple API surface
- No global state
- Nice structural foundation for long term maintenance. Check out the objectctl example.
Great job @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.
-
Yeah, the CLI stuff I do is usually kind of necessity driven and sort of one-off and single purpose. If I had to evolve and maintain them it would get ugly. This seems like a great option to modularize without imposing too much.
Kraj razgovora
Novi razgovor -
-
-
I used to maintain a CLI on my previous job. Recently, I was refactoring another CLI and decided to use interfaces instead of structs to define the contract. Way more straightforward and testable. Wonder how I never saw someone doing it. I probably should write a blog post about.
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.
Go)
see live music
breathe deeply
shitpost regularly
remember that no one is right
he/him