-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the Elastic license #15
Conversation
67b095e
to
e5e897a
Compare
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 <[email protected]>
b16d1e8
to
49b56ac
Compare
This should be ready now, sorry for the noise 😇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! Code looks good and functionality was much needed 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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%
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small typo and a remark.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/unkown/unknown/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Maybe we could add the valid licenses? This will make the error message easily actionable.
782e485
to
7768f16
Compare
7768f16
to
0b3515e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Introduces support for multiple licenses through the
--license
flag, keeping thecurrent one (
ASL2
) as the default, and adding anElastic
option.Closes #1