https://github.com/bugfender/go-generate-acknowledgements
Generate acknowledgement text from a go.mod file
https://github.com/bugfender/go-generate-acknowledgements
Last synced: 3 months ago
JSON representation
Generate acknowledgement text from a go.mod file
- Host: GitHub
- URL: https://github.com/bugfender/go-generate-acknowledgements
- Owner: bugfender
- License: apache-2.0
- Created: 2024-03-27T16:55:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-14T11:05:20.000Z (9 months ago)
- Last Synced: 2025-01-08T16:02:20.079Z (5 months ago)
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# go-generate-acknowledgements
Generates acknowledgement text from a go.mod file.This tool parses the given `go.mod` files and uses `github.com/google/licenseclassifier` to identify the license for each module, then output the text to the standard output, which you can capture.
## Installation
```shell
go install github.com/bugfender/go-generate-acknowledgements@latest
```## Usage
You can generate an acknowledgements file for your project this:
```shell
go-generate-acknowledgements > open-source-licenses.txt
```## Configuration
You can provide one or multiple `go.mod` files as arguments, like this:
```shell
go-generate-acknowledgements project-a/go.mod project-b/go.mod
```You can also provide a configuration file. By default, the file `go-generate-acknowledgements.yaml` is read (you can also prefix it with a `.`, or use the `yml` or `json` extensions). You can provide a configuration file as argument, like this:
```shell
go-generate-acknowledgements -config your-config.yaml
```Example configuration:
```yaml
# by default, no licenses are allowed (you can run go-generate-acknowledgements to discover the licenses you use and approve them)
allowedlicenses:
- Apache-2.0
- MIT
# you can specify the go.mod files to parse (by default "go.mod")
gomodfiles:
- module-a/go.mod
- module-b/go.mod
# you can override licenses for specific modules if the license classifier can not identify them correctly
licenseoverrides:
- moduleversion:
path: github.com/dchest/uniuri
version: v1.2.0
spdx: CC0-1.0
```# Support
This tool is open source and free to use (see `LICENSE`). We do not provide support.
We may implement new features, but we will likely only implement features that we need. If you'd like to contribute, check `CONTRIBUTING.md`.