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 <mura...@castech.com.tw>: > 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 flags specific to flag sets (cooltool >> <globalFlags> <subcommand> <commandFlags>). 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: >> >> https://play.golang.org/p/Jazn3aSX9-d >> >> Do I have to pick a different flag library or can this be done with >> package flag from the standard library? >> >> Thanks - Chris >> > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/1c81e2be-0920-4872-887e-19981a0543d1%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/1c81e2be-0920-4872-887e-19981a0543d1%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CALWqRZpaZ032J_G88WM2vFz9w2e9vO9K_PSYO7-QeGK_5t6CbQ%40mail.gmail.com.