While testing eget, I hit the rate limit (without token) of GitHub and thought it would be a nicer UX to not only show at which date the rate limit will be reset but also a duration to that date from now.
With this PR, eget shows the following message when the rate limit is exhausted:
$ eget --rate
Limit: 60, Remaining: 0, Reset: 2023-10-21 23:06:19 +0100 IST (20m42s)
And this message when it is not (e.g. using a token):
$ eget --rate
Limit: 5000, Remaining: 5000, Reset: 2023-10-21 23:57:48 +0100 IST
While testing eget, I hit the rate limit (without token) of GitHub and thought it would be a nicer UX to not only show at which date the rate limit will be reset but also a duration to that date from now.
With this PR,
eget
shows the following message when the rate limit is exhausted:And this message when it is not (e.g. using a token):