[go-nuts] Re: flags package: shared flags and flag sets

2020-05-07 Thread Manlio Perillo
On Wednesday, May 6, 2020 at 2:08:25 PM UTC+2, Chris Burkert wrote: > > Dear all, > > I'd like to mix shared flags with flags specific to flag sets (cooltool > ). However I struggle to parse the > shared flags only and pass the rest to the flagset for parsing. Here is > what I came up with: >

Re: [go-nuts] Re: flags package: shared flags and flag sets

2020-05-07 Thread Chris Burkert
Thank you very much. This is exactly what I was looking for. A simple way without the need for additional packages. Highly appreciated! Am Do., 7. Mai 2020 um 07:28 Uhr schrieb mural : > https://play.golang.org/p/Sga78gMLn-9 > > You can then use it like './mycli -d stream -rt' > > The '-d' option

[go-nuts] Re: flags package: shared flags and flag sets

2020-05-06 Thread mural
https://play.golang.org/p/Sga78gMLn-9 You can then use it like './mycli -d stream -rt' The '-d' option is a shared flag, and `-rt' is dedicated for the subcommand 'stream'. On Wednesday, May 6, 2020 at 8:08:25 PM UTC+8, Chris Burkert wrote: > > Dear all, > > I'd like to mix shared flags with