Running the following commands:
git clone git@github.com:ory/x.git
cd x
go-licenses report github.com/ory/x
results in one license reported
+W1230 09:01:11.509776 20797 library.go:394] module github.com/ory/x has empty version, defaults to HEAD. The license URL may be incorrect. Please verify!
github.com/ory/x,https://github.com/ory/x/blob/HEAD/LICENSE,Apache-2.0
Despite go.mod having several dependencies with proper licensing set up (https://github.com/ory/x/blob/master/go.mod).
which go
/Users/*/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.2.darwin-amd64/bin/go
The command works fine in other repositories like (https://github.com/ory/kratos):
kratos % .bin/go-licenses report github.com/ory/kratos
code.dny.dev/ssrf,https://github.com/daenney/ssrf/blob/v0.2.0/LICENSE,MIT
dario.cat/mergo,https://github.com/imdario/mergo/blob/v1.0.0/LICENSE,BSD-3-Clause
filippo.io/edwards25519,https://github.com/FiloSottile/edwards25519/blob/v1.1.0/LICENSE,BSD-3-Clause
github.com/Masterminds/goutils,https://github.com/Masterminds/goutils/blob/v1.1.1/LICENSE.txt,Apache-2.0
...
It also works for direct dependencies in that directory:
kratos % go-licenses report github.com/hashicorp/go-retryablehttp
github.com/hashicorp/go-cleanhttp,https://github.com/hashicorp/go-cleanhttp/blob/v0.5.2/LICENSE,MPL-2.0
github.com/hashicorp/go-retryablehttp,https://github.com/hashicorp/go-retryablehttp/blob/v0.7.7/LICENSE,MPL-2.0
However, again, for the other repo it does not show any dependencies:
kratos % go-licenses report github.com/ory/kratos
github.com/ory/x,https://github.com/ory/x/blob/v0.0.675/LICENSE,Apache-2.0
Running the following commands:
results in one license reported
Despite go.mod having several dependencies with proper licensing set up (https://github.com/ory/x/blob/master/go.mod).
The command works fine in other repositories like (https://github.com/ory/kratos):
It also works for direct dependencies in that directory:
However, again, for the other repo it does not show any dependencies: