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 > <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? > > Not sure if it can help, but look at: https://github.com/perillo/cmd/blob/master/cmd.go
It is adapted from cmd/go subcommand code and use the standard flag package. Manlio -- 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/ec533424-3d6c-49a1-b19b-f5d038c838b9%40googlegroups.com.