Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 1.12 KB

README.md

File metadata and controls

58 lines (37 loc) · 1.12 KB

Go Licenses

go-licenses is a small CLI which allows you to export and check the licenses of your dependencies from your go.mod file.

Installation

go install github.com/aboutyou/go-licenses

Usage

The project uses licenseclassifier to classify the licenses of each package.

Exporting the licenses

To export all modules and their packages run one of the following commands:

go-licenses export csv > licenses.csv

or

go-licenses export json > licenses.json

Check the licenses

The check command validates that all the modules in the project use compatible licenses.

go-licenses check

By default the following licenses are allowed:

  • Apache20
  • BSD2Clause
  • BSD3Clause
  • MIT
  • Facebook3Clause
  • Ruby
  • PHP301
  • Python20

Ideas

In Go 1.18 there will be a new package debug/buildinfo which will allow us to offer the commands also for compiled Go programms.

This will allow to run license compliance terms on your shipped binaries.

Maintainers