This script will build the dependency tree for the a module and print out a list version of the tree.
The first item on the list is the direct import into the project and then followed by the sub dependencies till the module been searched for is found.
This script does require the use of go mod.
Also note if the dependency graph is to large a recursion error with be throw.
To Run
The script is required to be ran from with in the go project folder but does not require to be in the root folder.
If go mod graph works this script can work.
python compile_tree.py <MOUDLE NAME>
or create runable script with chmod +x compile_tree.py
Sample Print Out
==================================================
github.com/operator-framework/operator-sdk@v0.15.2 <--Directly imported module
github.com/operator-framework/api@v0.0.0-20200120235816-80fd2f1a09c9
github.com/operator-framework/operator-lifecycle-manager@v0.0.0-20191115003340-16619cd27fa5
k8s.io/kubernetes@v1.16.0
github.com/docker/docker <--Searched for dependency
==================================================