Skip to content

SYSTEM Cited by 1 source

goda

goda (github.com/loov/goda) is an OSS Go-dependency-graph tool. Where go list tells you which packages a binary includes, goda tells you why — it renders the transitive import graph and supports a reach(...) function that lists all paths from the main package to a target package.

Invocation

Takes GOOS, GOARCH, and build tags like the standard Go toolchain:

GOOS=linux GOARCH=amd64 goda graph "my_tag_1=1(my_tag_2=1(.:all))"
  • . — start from the current package.
  • :all — include every direct + indirect dependency.
  • my_tag_1=1(...) — same build-tag syntax as the compiler.

The reach function restricts the graph to paths reaching a specific target:

GOOS=linux GOARCH=amd64 goda graph "reach(my_tag_1=1(my_tag_2=1(.:all)), ./target/package)"

This is the decisive tool for pinpointing one-function-pulls-a- dep-stack cases (single-function-forced-package-split).

Canonical application: Datadog Agent

Used in the 2026-02-18 Datadog binary-size post to trace:

  • 526 k8s.io/* packages / 36 MiB of accidental Kubernetes inclusion in the trace-agent binary back to one function in one package (PR #32174).
  • 245 MiB amd64-only regression back to containerd/plugin/plugin_go18.go's import of the stdlib plugin package (go-plugin-dynamic-linking-implication).

Complementary tools

  • go list -f '{{ join .Deps "\n" }}' — what is in the binary.
  • goda — why (import paths + reach()).
  • systems/go-size-analyzer — how much each dep costs in bytes.

The three together turn "we accidentally ship Kubernetes" into an actionable one-edge fix.

Seen in

Last updated · 766 distilled / 2,225 read