Hi,
I've wanted to write some adapter methods for another logging package (
gopkg.in/inconshreveable/log15.v2):
github.com/tgulacsi/go/loghlpIf I import the "testing" package in a non-testing package (this library), all testing flags appear in the program using this loghlp package.
This is only annoying.
But when I import glog (
github.com/golang/glog), it register "v", and I like to use the same in my apps, so as I import anything which importes loghlp,
my main app panics on start (duplicate flag registration).
I have a very hackish hack against this: create a new flag.CommandLine FlagSet after importing glog and testing.
But this seems erroneous, as if any other package does register flags rightfully, this may mask that...
Any better idea?
Thanks,
Tamás Gulácsi