justforfunc #32: CLI tools with Cobra
Video Statistics and Information
Channel: justforfunc: Programming in Go
Views: 29,977
Rating: undefined out of 5
Keywords: golang, go, justforfunc, programming, CLI, command line interface, cobra
Id: WvWPGVKLvR4
Channel Id: undefined
Length: 27min 8sec (1628 seconds)
Published: Tue Apr 03 2018
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
FWIW, this is Cobra, not CORBA.
/shudders
Instead of using
init
it can be better to usePreRun
orPersistentPreRun
or the..E
variants to initialize common things. only a little better though because things still end up as global, but you do have more control over execution.