go-licenser

command module
v0.0.0-...-e522343 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

README

Go Licenser Build Status

Small zero dependency license header checker for source files. The aim of this project is to provide a common binary that can be used to ensure that code source files contain a license header. It's unlikely that this project is useful outside of Elastic at the current stage, but the licensing package can be used as a building block.

Supported Licenses

  • Apache 2.0
  • Elastic
  • Elastic 2.0
  • Elastic Cloud

Supported languages

  • Go

Installing

go get -u github.com/elastic/go-licenser

Usage

Usage: go-licenser [flags] [path]

  go-licenser walks the specified path recursively and appends a license Header if the current
  header doesn't match the one found in the file.

Options:

  -copyright
        sets the copyright string as the first line
  -d    skips rewriting files and returns exitcode 1 if any discrepancies are found.
  -exclude value
        path to exclude (can be specified multiple times).
  -ext string
        sets the file extension to scan for. (default ".go")
  -license string
        sets the license type to check: ASL2, ASL2-Short, Cloud, Elastic, Elasticv2 (default "ASL2")
  -licensor string
        sets the name of the licensor (default "Elasticsearch B.V.")
  -version
        prints out the binary version.

Contributing

See CONTRIBUTING.md.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
golden
ASL2-Short/cloud
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
ASL2-Short/excludedpath
Package excludedpath holds test data for the licensing cmd
Package excludedpath holds test data for the licensing cmd
ASL2-Short/multilevel
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
ASL2-Short/multilevel/sublevel
Package sublevel holds test data for the licensing cmd
Package sublevel holds test data for the licensing cmd
ASL2-Short/singlelevel
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
ASL2-Short/x-pack
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
ASL2-Short/x-pack-v2
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
ASL2/cloud
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
ASL2/excludedpath
Package excludedpath holds test data for the licensing cmd
Package excludedpath holds test data for the licensing cmd
ASL2/multilevel
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
ASL2/multilevel/sublevel
Package sublevel holds test data for the licensing cmd
Package sublevel holds test data for the licensing cmd
ASL2/singlelevel
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
ASL2/x-pack
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
ASL2/x-pack-v2
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Cloud/cloud
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Cloud/excludedpath
Package excludedpath holds test data for the licensing cmd
Package excludedpath holds test data for the licensing cmd
Cloud/multilevel
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Cloud/multilevel/sublevel
Package sublevel holds test data for the licensing cmd
Package sublevel holds test data for the licensing cmd
Cloud/singlelevel
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Cloud/x-pack
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Cloud/x-pack-v2
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Elastic/cloud
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Elastic/excludedpath
Package excludedpath holds test data for the licensing cmd
Package excludedpath holds test data for the licensing cmd
Elastic/multilevel
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Elastic/multilevel/sublevel
Package sublevel holds test data for the licensing cmd
Package sublevel holds test data for the licensing cmd
Elastic/singlelevel
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Elastic/x-pack
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Elastic/x-pack-v2
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Elasticv2/cloud
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Elasticv2/excludedpath
Package excludedpath holds test data for the licensing cmd
Package excludedpath holds test data for the licensing cmd
Elasticv2/multilevel
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Elasticv2/multilevel/sublevel
Package sublevel holds test data for the licensing cmd
Package sublevel holds test data for the licensing cmd
Elasticv2/singlelevel
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Elasticv2/x-pack
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Elasticv2/x-pack-v2
Package testdata holds test data for the licensing cmd
Package testdata holds test data for the licensing cmd
Package licensing provides a set of functions that read the top lines of a file and can determine if they match a specific header.
Package licensing provides a set of functions that read the top lines of a file and can determine if they match a specific header.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL