go-licenses

1 개요[ | ]

go-licenses
고-라이선스
  • Go 패키지 및 그 의존성에서 사용하는 라이선스를 보고하는 가벼운 도구

2 설치[ | ]

$ go install github.com/google/go-licenses@latest
go: downloading github.com/google/go-licenses v1.6.0
go: downloading github.com/otiai10/copy v1.6.0
go: downloading github.com/spf13/cobra v1.6.0
...
go: downloading github.com/xanzy/ssh-agent v0.2.1
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading gopkg.in/warnings.v0 v0.1.2
$ go-licenses | head -7
go-licenses helps you work with licenses of your go project's dependencies.

Prerequisites:
1. Go v1.16 or later.
2. Change directory to your go project.
3. Run "go mod download".

3 실행예시[ | ]

GIT_REPO=github.com/gin-gonic/gin

git clone https://$GIT_REPO
cd $(basename $GIT_REPO)
go mod download
go-licenses report $GIT_REPO
testuser@localhost:~$ GIT_REPO=github.com/gin-gonic/gin
testuser@localhost:~$ git clone https://$GIT_REPO
Cloning into 'gin'...
remote: Enumerating objects: 7107, done.
remote: Counting objects: 100% (32/32), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 7107 (delta 14), reused 19 (delta 5), pack-reused 7075
Receiving objects: 100% (7107/7107), 3.01 MiB | 9.45 MiB/s, done.
Resolving deltas: 100% (4531/4531), done.
testuser@localhost:~$ cd $(basename $GIT_REPO)
testuser@localhost:~/gin$ go mod download
testuser@localhost:~/gin$ go-licenses report $GIT_REPO
...
golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.5.0:LICENSE,BSD-3-Clause
google.golang.org/protobuf,https://github.com/protocolbuffers/protobuf-go/blob/v1.28.1/LICENSE,BSD-3-Clause
gopkg.in/yaml.v2,https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE,Apache-2.0

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}