Skip to content
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

Assert now takes into consideration the license. #7855

Merged
merged 1 commit into from
Aug 8, 2018

Conversation

ph
Copy link
Contributor

@ph ph commented Aug 3, 2018

  • License headers for both Elastic and ASL2 are now accessible by
    code using the licenses package.
    licenses.Elastic
    licenses.ASL2
    
  • Added a generator to take care of syncing the files in the licenses/
    directory.
  • Added LICENSE as a variable for the makefile to configure the
    go-licenser this is useful if a beat as a different license.

  - License headers for both Elastic and ASL2 are now accessible by
  code using the licenses package.
      ```
      licenses.Elastic
      licenses.ASL2
      ```
  - Added a generator to take care of syncing the files in the licenses/
  directory.
  - Added `LICENSE` as a variable for the makefile to configure the
  go-licenser this is useful if a beat as a different license.
)

var Template = template.Must(template.New("licenseheader").Parse(`
{{ $t := "` + "`" + `" }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't found a better way to embed ticks in ticks :(

@@ -0,0 +1,58 @@
// Licensed to Elasticsearch B.V. under one or more contributor
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for multiple licenses.. ;)

@ph ph requested a review from ruflin August 7, 2018 12:53
@ph
Copy link
Contributor Author

ph commented Aug 7, 2018

@ruflin can you take a look at this?


content, err = ioutil.ReadFile("ELASTIC-LICENSE-header.txt")
if err != nil {
panic("could not read Elastic license.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason you use panic instead of os.Exit(1)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no specific I could have use println + os.Exit(1)

@ruflin ruflin merged commit 437a62a into elastic:master Aug 8, 2018
andrewkroh pushed a commit to andrewkroh/beats that referenced this pull request Oct 24, 2018
- License headers for both Elastic and ASL2 are now accessible by
  code using the licenses package.
      ```
      licenses.Elastic
      licenses.ASL2
      ```
  - Added a generator to take care of syncing the files in the licenses/
  directory.
  - Added `LICENSE` as a variable for the makefile to configure the
  go-licenser this is useful if a beat as a different license.

(cherry picked from commit 437a62a)
andrewkroh added a commit that referenced this pull request Oct 24, 2018
- License headers for both Elastic and ASL2 are now accessible by
  code using the licenses package.
      ```
      licenses.Elastic
      licenses.ASL2
      ```
  - Added a generator to take care of syncing the files in the licenses/
  directory.
  - Added `LICENSE` as a variable for the makefile to configure the
  go-licenser this is useful if a beat as a different license.

(cherry picked from commit 437a62a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants