mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 19:36:22 +00:00
As of go1.13, test flags like test.timeout are registered lazily. This means they are not available in package init() methods: > Testing flags are now registered in the new Init function, > which is invoked by the generated main function for the test. > As a result, testing flags are now only registered when running > a test binary, and packages that call flag.Parse during package > initialization may cause tests to fail. This moves the copy of CLI flags into TestMain, just prior to parse.