Closed Scoubi closed 3 years ago
I get pretty much the same error from OSX
./adalanche
./adalanche flag redefined: authmode
panic: ./adalanche flag redefined: authmode
goroutine 1 [running]:
flag.(*FlagSet).Var(0xc0000be660, 0x16670e0, 0xc000384d50, 0x15af1f6, 0x8, 0x15cd285, 0x62)
/usr/local/go/src/flag/flag.go:871 +0x485
flag.(*FlagSet).StringVar(...)
/usr/local/go/src/flag/flag.go:760
flag.(*FlagSet).String(0xc0000be660, 0x15af1f6, 0x8, 0x15ab692, 0x4, 0x15cd285, 0x62, 0xc000384d40)
/usr/local/go/src/flag/flag.go:773 +0xa5
flag.String(...)
/usr/local/go/src/flag/flag.go:780
main.main()
/Users/e1485/adalanche/main.go:93 +0x325
Yes, it's a bug. I wasn't aware that you weren't allowed to redefine a flag.
I've worked around it with another pattern, so it should work for you now.
Obviously I'm developing this on Windows :-) Thanks for reporting this.
On a fully updraded Ubuntu 18 I get the following when trying to run adalanche
I'm pretty new to Go, but from what I understand
authmode
is defined twice in the code..I get the same error regardless of the flags I pass to it.
Thank you.