{"id":13471947,"url":"https://github.com/loov/goda","last_synced_at":"2025-05-14T14:09:21.413Z","repository":{"id":37979147,"uuid":"150718780","full_name":"loov/goda","owner":"loov","description":"Go Dependency Analysis toolkit","archived":false,"fork":false,"pushed_at":"2025-03-13T12:24:47.000Z","size":211,"stargazers_count":1480,"open_issues_count":19,"forks_count":46,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-12T10:18:41.195Z","etag":null,"topics":["dependency-analysis","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-28T09:40:24.000Z","updated_at":"2025-04-11T09:29:03.000Z","dependencies_parsed_at":"2022-07-12T17:04:16.440Z","dependency_job_id":"37530664-ce5e-4c68-b8a5-7bf0f126179c","html_url":"https://github.com/loov/goda","commit_stats":{"total_commits":169,"total_committers":8,"mean_commits":21.125,"dds":0.08875739644970415,"last_synced_commit":"e8ffab4e6a8847455476431457b040d90b5fc9ca"},"previous_names":["loov/ago"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loov%2Fgoda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loov%2Fgoda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loov%2Fgoda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loov%2Fgoda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loov","download_url":"https://codeload.github.com/loov/goda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254160250,"owners_count":22024567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dependency-analysis","go"],"created_at":"2024-07-31T16:00:50.608Z","updated_at":"2025-05-14T14:09:16.394Z","avatar_url":"https://github.com/loov.png","language":"Go","funding_links":[],"categories":["Go","go","Repositories","开发工具\u0026框架"],"sub_categories":[],"readme":"# Goda\n\nGoda is a Go dependency analysis toolkit. It contains tools to figure out what your program is using.\n\n_Note: the exact syntax of the command line arguments has not yet been finalized. So expect some changes to it._\n\n### Installation\n\nTo install, you'll need a recent version of Go and then you can install via:\n\n```\ngo install github.com/loov/goda@latest\n```\n\nThe commands assume that your GOBIN is reachable on path.\n\nThe graph visualizations require [GraphViz](https://graphviz.org/) for rendering the graph.\n\n## Cool things it can do\n\n```\n# All of the commands should be run in the cloned repository.\ngit clone https://github.com/loov/goda \u0026\u0026 cd goda\n\n# draw a graph of packages in github.com/loov/goda\ngoda graph \"github.com/loov/goda/...\" | dot -Tsvg -o graph.svg\n\n# draw a graph of command github.com/loov/goda, within the module\ngoda graph \"github.com/loov/goda:mod\" | dot -Tsvg -o graph.svg\n\n# draw a dependency graph of github.com/loov/goda and dependencies\ngoda graph -cluster -short \"github.com/loov/goda:all\" | dot -Tsvg -o graph.svg\n\n# list direct dependencies of github.com/loov/goda\ngoda list \"github.com/loov/goda/...:import\"\n\n# list dependency graph that reaches flag package, including std\ngoda graph -std \"reach(github.com/loov/goda/...:all, flag)\" | dot -Tsvg -o graph.svg\n\n# list packages shared by github.com/loov/goda/pkgset and github.com/loov/goda/cut\ngoda list \"shared(github.com/loov/goda/pkgset:all, github.com/loov/goda/cut:all)\"\n\n# list packages that are only imported for tests\ngoda list \"github.com/loov/goda/...:+test:all - github.com/loov/goda/...:all\"\n\n# list packages that are imported with `purego` tag\ngoda list -std \"purego=1(github.com/loov/goda/...:all)\"\n\n# list packages that are imported for windows and not linux\ngoda list \"goos=windows(github.com/loov/goda/...:all) - goos=linux(github.com/loov/goda/...:all)\"\n\n# list how much memory each symbol in the final binary is taking\ngoda weight -h $GOPATH/bin/goda\n\n# show the impact of cutting a package\ngoda cut ./...:all\n\n# print dependency tree of all sub-packages\ngoda tree ./...:all\n\n# print stats while building a go program\ngo build -a --toolexec \"goda exec\" .\n\n# list dependency graph in same format as \"go mod graph\"\ngoda graph -type edges -f '{{.ID}}{{if .Module}}{{with .Module.Version}}@{{.}}{{end}}{{end}}' ./...:all\n```\n\nMaybe you noticed that it's using some weird symbols on the command-line while specifying packages. They allow for more complex scenarios.\n\nThe basic syntax is that you can specify multiple packages:\n\n```\ngoda list github.com/loov/goda/... github.com/loov/qloc\n```\n\nBy default it will select all the specific packages. You can select the package's direct dependencies with `:import`, direct and indirect dependencies with `:import:all`, the package and all of its direct and indirect dependencies with `:all`:\n\n```\ngoda list github.com/loov/goda/...:import\ngoda list github.com/loov/goda/...:import:all\ngoda list github.com/loov/goda/...:all\n```\n\nYou can also do basic arithmetic with these sets. For example, if you wish to ignore all `golang.org/x/tools` dependencies:\n\n```\ngoda list github.com/loov/goda/...:all - golang.org/x/tools/...\n```\n\nTo get more help about expressions or formatting:\n\n```\ngoda help expr\ngoda help format\n```\n\n## Graph example\n\nHere's an example output for:\n\n```\ngit clone https://github.com/loov/goda \u0026\u0026 cd goda\ngoda graph github.com/loov/goda:mod | dot -Tsvg -o graph.svg\n```\n\n![github.com/loov/goda dependency graph](./graph.svg)\n\n## How it differs from `go list` or `go mod`\n\n`go list` and `go mod` are tightly integrated with Go and can answer simple queries with compatibility. They also serves as good building blocks for other tools.\n\n`goda` is intended for more complicated queries and analysis. Some of the features can be reproduced by format flags and scripts. However, this library aims to make even complicated analysis fast.\n\nAlso, `goda` can be used together with `go list` and `go mod`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floov%2Fgoda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floov%2Fgoda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floov%2Fgoda/lists"}