Add support for the Elastic license#15
Merged
exekias merged 4 commits intoelastic:masterfrom Aug 3, 2018
Merged
Conversation
67b095e to
e5e897a
Compare
Contributor
Author
|
something is wrong after rebasing, will have a look |
8d08075 to
b16d1e8
Compare
Introduces support for multiple licenses, keeping the current one (`ASL2`) as the default, and adding an `Elastic` option. Signed-off-by: Carlos Pérez-Aradros Herce <exekias@gmail.com>
b16d1e8 to
49b56ac
Compare
Contributor
Author
|
This should be ready now, sorry for the noise 😇 |
marclop
approved these changes
Aug 2, 2018
Contributor
marclop
left a comment
There was a problem hiding this comment.
Thanks for the contribution! Code looks good and functionality was much needed 🙇
ph
suggested changes
Aug 2, 2018
There was a problem hiding this comment.
I think we should either relax the strictness of the name or update the documentation to display the right license option. Using 'Elastic' with the right capitalization works but the doc mention 'elastic' or 'apache2' which should be 'ASL2'
❯ go-licenser -license elastic
unkown license: elastic%
ph
suggested changes
Aug 2, 2018
main.go
Outdated
| func run(args []string, license string, exclude []string, ext string, dry bool, out io.Writer) error { | ||
| header, ok := Headers[license] | ||
| if !ok { | ||
| return &Error{err: fmt.Errorf("unkown license: %s", license), code: errUnknownLicense} |
There was a problem hiding this comment.
nit: Maybe we could add the valid licenses? This will make the error message easily actionable.
Contributor
Author
782e485 to
7768f16
Compare
7768f16 to
0b3515e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduces support for multiple licenses through the
--licenseflag, keeping thecurrent one (
ASL2) as the default, and adding anElasticoption.Closes #1