The connstring package uses the internal package to wrap errors, but that package directly imports the testing package. Either we need to remove the code that's testing related from the internal package or we need to remove the use of the internal package from the connstring package. This dependency is currently causing the testing package to register it's flags which affects any user applications importing the driver.
(original description below)
I am using MongoDB go driver in my project. Everything works fine reading and writing the database. However, as I add MongoDB go driver as a dependency, the help message shows the unit testing commands like in the following screenshot.
This is a sign that the production code depends on the testing package. I then used godepgraph (https://github.com/kisielk/godepgraph) to figure out which package depends on the testing package. I can identify that the internal package is where the problem is and this line (https://github.com/mongodb/mongo-go-driver/blob/422ba92f7d4e819d4f08b95ab7ca067f9612d437/internal/channel_connection.go#L11) suggests that the testing package is used in a file that is not ended with `_test`.
Am I using the mongodb-go-driver in a wrong way? Or if I am correct, can someone fix this problem?
Thanks!