1

If i import code from a github repository in my go code by doing something like

import "github.com/.../..."

And this repository is licensed under the MIT license.

Do I need to include the copyright notice? And if so where and in what format?

4

I'm sorry if I seem terse, we just seem to be having a rush of people at the moment who can't read copyright licences. The MIT licence requires that

[...] The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Since you're compiling a chunk of somebody else's code into your executable, we need to examine what rights you have to do that. The licence makes it clear that you may do this, in return for retaining a copyright notice and two paragraphs of permissions statement.

So yes, you do need to include the copyright notice, and a bit more, too. The licence doesn't say how; since you and the author of the other code are now joint rightsholders in the resulting code, you might want to put their notice wherever you put your own. Finding a suitable place for the permissions statement is left as an exercise for you; but it would be worth making it clear, when you do, that it's included as a requirement of a licence on a part of the code only, and doesn't apply to your whole codebase (unless, of course, you wish to publish your code under MIT also).

| improve this answer | |
  • Hi, thanks for the answer. Could you please give me a example to how might do this? I completely new to this and have very little clue, I apoligise. – helper Jun 11 at 7:57
  • I'm sorry, but giving a general example is impossible - it amounts to "include the copyright statement and two extra paragraphs of text", which is what I said - and giving a specific example requires a lot more detail about your code than you've chosen to provide. Is it a GUI app? Does it come with a manual? Is it SaaS? – MadHatter Jun 11 at 7:59
  • The reason for my question wasn't that I had not read the license, but that I wasn't sure if i should make a copyright notice since i was importing it directly from the owners repository (which already contained the license) rather than making a copy and keeping it in my repository. – helper Jun 11 at 8:42
  • 1
    Assuming you believe that dynamically-linking in a library makes your work a derivative of the library (which I do, though the point is neither settled nor universally-accepted), you have done at least as much in architecting your code to drag their code in at compile-time, and the same obligations apply. – MadHatter Jun 11 at 8:54
  • I did some thinking and technically i am simply putting an import statement pointing the the repo of the author so i am not storing a copy of the code and therefore this line : "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." does not apply. Am i right in this reasoning? – helper Jun 12 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.