Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph Go dependencies for each module #725

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,19 @@ go-tidy: go-workspace-setup
echo -e "\n" || exit 1; \
popd ; \
done
go-module-graph:
sudo apt install graphviz
go install github.com/loov/goda@latest
rm -f docs/go_dependencies/*.svg
@declare -a GO_MODULES=(); \
readarray -t GO_MODULES < <(go list -f {{.String}} -m); \
for GO_MODULE in $${GO_MODULES[@]}; \
do \
echo "********* graphing modules for: $${GO_MODULE} *********" ; \
filename="$${GO_MODULE//\//_}"; \
filename="$${filename//./-}"; \
goda graph -cluster -short "$${GO_MODULE}/... + $${GO_MODULE}/...:import" | dot -Tsvg -o docs/go_dependencies/$${filename}.svg ; \
done
go-build: go-workspace-setup go-tidy
go list -f '{{.Dir}}/...' -m | xargs go build
go-workspace-setup: go-workspace-clean
Expand Down
Empty file added docs/go_dependencies/.gitkeep
Empty file.
358 changes: 358 additions & 0 deletions docs/go_dependencies/github-com_GoogleChrome_webstatus-dev_backend.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,600 changes: 1,600 additions & 0 deletions docs/go_dependencies/github-com_GoogleChrome_webstatus-dev_lib.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
258 changes: 258 additions & 0 deletions docs/go_dependencies/github-com_GoogleChrome_webstatus-dev_lib_gen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
325 changes: 325 additions & 0 deletions docs/go_dependencies/github-com_GoogleChrome_webstatus-dev_util.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading