10 ms·
It's possible that if you have packages that understand flags (config package, with flags in init(), for example) that if you include it after the testing packa
by codebeaker 13y ago
It's possible that if you have packages that understand flags (config package, with flags in init(), for example) that if you include it after the testing package, or before. One of them won't accept flags. (because flag.Parse() has already been called)
- 1631- 13y agoYou can't rely on the order of imports initialization anyway. See http://golang.org/ref/spec#Program_execution http://golang.org/ref/spec#Program_execution .. I believe that's also the reason, you shouldn't call `flag.Parse()` in `init()`