-
Notifications
You must be signed in to change notification settings - Fork 93
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
Upgrade licenses #812
Upgrade licenses #812
Conversation
- update .licignore to contain terratests, main.go, and gslb_controller.goe. - remove old license from source code and terratests - place license on the new place in the go files (under package *\n) - update build pipeline (`build.yml`) - bump golic to v0.7.2 ```shell golic remove -t apache2 golic inject -t apache2 ``` Signed-off-by: kuritka <kuritka@gmail.com>
@@ -1,3 +1,9 @@ | |||
// Code generated by MockGen. DO NOT EDIT. |
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.
so if we re-run the mock generation, is it going to be ok w/ golic?
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.
sure, it always inject license into it, see: https://github.com/k8gb-io/k8gb/blob/master/Makefile#L374
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.
place license on the new place in the go files (under package *\n)
curious about this change. Was it breaking something with the license header before package
?
@ytsarev, thx for question. A valid go file structure can be : /*
optional comment
*/
// Package xyz optional comment, if it exists, it must start with 'Package xyz' otherwise linters may shout. e.g: idea goland always warns.
package xyz
... the problem starts when go directives are introduced, which must be in a certain place in the file - for example at the beginning: //go:build !ignore_autogenerated
// +build !ignore_autogenerated
// ^^ directives must be on the top...
// Package xyz defines....
package xyz In such case, finding a place to inject the licence is more difficult. finding a place for the license would be significantly harder, but not impossible:
|
@kuritka that makes total sense, thanks for the explanation |
.licignore
to contain/terratests
,main.go
, andgslb_controller.go
.build.yml
)v0.7.2
Signed-off-by: kuritka kuritka@gmail.com