Looking back at the history of this line, we find:
https://github.com/google/go-github/commit/b416fdaac841e7c2404b365cf6aa7b9f1d450d93
which is one of the early commits.
I'm betting that there wasn't a whole lot of precedent at that time.
Is this causing problems for you, or are you just curious?
@gmlewis thank you for having a look,
Is this causing problems for you, or are you just curious?
Not really, as there are no generics (and I don't want to bypass compiler type checking via reflect), I have some duplicate code for handling of issues and PRs. So it's not a problem to have different types here.
I was just wondering about that. Not sure if fixing this is a good idea: it would potentially break everything, what is using this part of code. Up to you, feel free to close this issue or let me know and I'll provide a fix.
OK, thank you, @artem-sidorenko!
Since this has been like this for almost 6 years, I'm leaning toward not making a breaking change and leaving it alone. I'm betting that there is no real performance concern here either (one way or the other).
So I appreciate the report because it is good to point out inconsistencies and discuss them!
Let's leave this open for a couple days in case anyone wants to chime in if they have a strong opinion, and then we'll go ahead and close the issue otherwise.
@gmlewis what about this issue, how can we proceed?
Actually, in light of #180 and all the breaking API changes we've been making lately, I think I will go ahead and fix this one myself.
Most helpful comment
Actually, in light of #180 and all the breaking API changes we've been making lately, I think I will go ahead and fix this one myself.