mysql_random_data_load
mysql_random_data_load copied to clipboard
Refactor data generator runner into exported package
We want to be able to use most of the functionality of this tool as a package we can import into other Go binaries, so this refactors the run()
function from the main package into a generator
package that can be imported and used. Since Run()
still takes the same arguments, several of which are custom types that are non-trivial to recreate by the caller, the methods main uses to create those parameters of calling Run()
are also extracted out to the new generate
package as they are part of the data generation process.
The existing test cases seem to cover the critical functionality here to ensure it's not breaking. I will also be testing this branch internally with our own tools to ensure we can call the generator.Run()
method as expected.
I guess I should note that I ran the tests on this personally and they all passed but the automated test suite seems to just be broken in master outside of the context of this refactor. PR #28 (accidentally) fixes the RandomBinary issue at least.