If i import code from a github repository in my go code by doing something like
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?
Open Source Stack Exchange is a question and answer site for people organizing, marketing or licensing open source development projects. It only takes a minute to sign up.Sign up to join this community
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).