dbrudner/go-nba

Two players with the same name for getPlayerStats

Opened this issue · 0 comments

Right now, if two players share the same name, getPlayerStats will only return the first one. Obviously an edge case, but it's worth handling.

The cause of this is FindPlayerID in nba/players.go returns only the first ID it finds. For performance, the loop breaks as soon as it finds the first player name that matches the search. Might not be worth fixing, or it might be worth adding additional search parameters for this func in the API.