ChimeraCoder / anaconda

A Go client library for the Twitter 1.1 API
MIT License
1.14k stars 247 forks source link

Handle consumer key & secret per anaconda instance, not globally #182

Open galeone opened 7 years ago

galeone commented 7 years ago

I moved the oauthClient variable within the TwitterAPI structure and I changed every method that used the oauthClient variable to use the new one, within the structure.

In this way, we can spawn multiple thread-safe applications. In short: fix #101

muesli commented 7 years ago

I agree this looks a lot neater, but it would break backwards compatibility. So this will probably be on hold until we decide to bump the major API version.

galeone commented 7 years ago

No problem, the code is still here thus you're free to merge whenever you want it (and if you want it!).

In the meantime, if someone wants to use the thread safe version it can just use my fork.