Go-github: Utilizing Same API Client Pattern in another API Client Library

Created on 15 May 2018  路  5Comments  路  Source: google/go-github

First off, major kudos to the authors of this API client library. It's really well written and uses some great design patterns for API client libraries. I'm super impressed!

That being said, I'm also working on an API client library that interacts with another API that is not GitHub. Is it ok if I reference similar structures and design patterns that I've noticed in this source in my own API client library?

I wanted to make sure I asked for approval of this, because the BSD license isn't necessarily clear in that regard.

All 5 comments

@willnorris is the original author of this library and deserves the lion's share of your compliments. Thank you for the kind words! Will is also the person who can give you guidance on derivative works.

As Glenn said, Will is indeed the person who can give you a good answer.

I personally hope you do apply the best practices of making a high quality Go package to your API client library.

I've contributed a fair amount to this library, and I will say that I've done so because I want this library to be as good as possible (for myself, and for other gophers), but also because I want the codebase to serve as good an example as possible for others who want to write high quality Go code.

Also, take a look at issue #860 which is similar.

@gmlewis and @shurcooL thank you and keep up the awesome work!

Thanks, I'm glad it's been useful for you.

I can't give you specific legal advice on open source licenses, but I can give you some general principles:

  • if you're actually copying and pasting code from an open source library, then the original license of the library generally still applies. All open source licenses allow for these kinds of derivative works, though some impose certain additional obligations. BSD is just a "notice style" license, which only requires acknowledgement.
  • ideas aren't subject to copyright. You can typically learn from someone else's code and use similar ideas and patterns without concerns for license obligations, etc. Sometimes the ideas in the code may be covered by patents, but that is seldom a concern for simple client libraries like go-github.

In short, yes please do copy the patterns!

@willnorris awesome, thank you very much for your detailed response! Happy coding :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adrienzieba picture adrienzieba  路  3Comments

gmlewis picture gmlewis  路  3Comments

gmlewis picture gmlewis  路  3Comments

you06 picture you06  路  3Comments

OGKevin picture OGKevin  路  3Comments