Re: [go-nuts] flag: bug with shared values?

2020-09-18 Thread Manfred Touron
to know: 1. if I need to open an issue or not on the go repo, if the fix is not about code, it can be about doc maybe? 2. if other gophers has ideas of workaround? Thank you On Friday, September 18, 2020 at 2:23:04 AM UTC+2 Ian Lance Taylor wrote: > On Thu, Sep 17, 2020 at 5:04 PM Manfred To

[go-nuts] flag: bug with shared values?

2020-09-17 Thread Manfred Touron
Hi, I think that I discovered a bug in the stdlib flag package: sharedFlag := "init-value" fooFs := flag.NewFlagSet("foo", flag.ContinueOnError) barFs := flag.NewFlagSet("bar", flag.ContinueOnError) fooFs.StringVar(&sharedFlag, "baz", "foo-default", "testing") barFs.StringVar(