A utility for getting the dependencies of a specific package in a Go module.
Looking for github.com/spf13/cobra
with tag v1.1.1
in grokify/go-aha
.
A module is directly using1 the module which is directly under it.
$ git clone 'https://github.com/grokify/go-aha.git'
$ cd go-aha
$ git checkout v0.2.3
$ getGoDependencyHierarchy 'github.com/spf13/[email protected]'
github.com/grokify/go-aha
⬇
github.com/grokify/[email protected]
⬇
github.com/wcharczuk/[email protected]+incompatible
⬇
github.com/blend/[email protected]
⬇
github.com/spf13/[email protected]
By default the script will timeout after 16 seconds. In order to change the default time limit (in seconds) set the $GGDH_TIMEOUT
env var.
Note: Depending on your shell, this might need to be exported.
Scenario Description | Support |
---|---|
Chain starts with an incompatible pkg | ❌ |
Incompatible pkgs inside the chain | ✔️ |
Chain ends with an incompatible pkg | ✔️ |
Footnotes
-
Directly using means the module is directly inside
go.mod
not justgo.sum
. ↩