rhnvrm / lyric-api-go

:musical_score: API to search for lyrics from various providers.
MIT License
18 stars 8 forks source link

fix genius implementation; other changes #1

Closed brenol closed 5 years ago

brenol commented 5 years ago

Hi! I made a few small changes to improve LyricApi.

I think the idea is very nice but there are a few other cases that I did not handle in this pull-request:

The idea is very nice though; hope I helped to improve it a little bit.

rhnvrm commented 5 years ago

@brenol - Thanks for the PR. Just a few points,

  1. https://godoc.org/github.com/PuerkitoBio/goquery#NewDocument says that it is deprecated. It would be better to not use it and keep the current implementation and stick to bytes for now. I am planning to allow passing the net/http config to the New function to help reuse it.
  2. The changes for "remove unused line" and L78 (https://github.com/rhnvrm/lyric-api-go/pull/1/files#diff-cfad0e134601aa73999ff0ae5c44bf71R78) LGTM.

Please send a squashed commit with the changes mentioned in 2.

Thank you.

I will add a test for lyrics.go after your PR is merged along with removing log.fatal lines (thanks for pointing that out, I had missed this).

Regards

brenol commented 5 years ago

Oh! Sorry, I did not know that NewDocument was being deprecated since I've been using it for a long time for some quick stuff.

I'll modify the PR and send it over with everything correctly. Thanks for pointing that out!

brenol commented 5 years ago

OK, think I squashed correctly. Really really not used to doing rebases and push -force.

Thanks!

rhnvrm commented 5 years ago

@brenol LGTM, have merged the changes! Thanks for your contribution. :+1: