A lightweight tool to report on the licenses used by a Go package and its dependencies. Highlight! Versioned external URL to licenses can be found at the same time.
Apache License 2.0
824
stars
125
forks
source link
go-licenses doesn't work when installed with versioned go #193
go install golang.org/dl/go1.20.1@latest
go1.20.1 download
go1.20.1 install github.com/google/go-licenses@v1.6.0
git clone https://github.com/google/go-licenses
cd go-licenses
go1.20.1 mod download
go-licenses report github.com/google/go-licenses
This will produces just a list of errors and no license info:
E0309 15:49:30.676554 52440 library.go:117] Package context does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128.
E0309 15:49:30.676605 52440 library.go:117] Package encoding/csv does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128.
E0309 15:49:30.676613 52440 library.go:117] Package errors does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128.
...
When I use "versioned go binary" like instructed in https://go.dev/doc/manage-install go-licenses doesn't work.
Steps to produce:
This will produces just a list of errors and no license info:
Env diff:
How ever using
go run
does seem to work: