summaryrefslogtreecommitdiff
path: root/dependencies/analyses/dependency-tree.sh
blob: 3c9dccc5157a6f68445e1936ac9d1ddd668203a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/bash

if test "$#" -ne 1; then
	echo "invalid arguments: usage: $0 path to package"
	exit 1
fi

DATA=$(go list $1/... \
	| xargs -d '\n' go list -f '{{ .ImportPath }}: {{ join .Imports ", " }}' \
	| awk '{ printf "%s\n\n", $0 }' \
	)

echo "$DATA"