kevincobain2000 / gobrew

Go version manager, written in Go. Super simple tool to install and manage Go versions. Install go without root. Gobrew doesn't require shell rehash.
https://medium.com/web-developer/go-version-manager-gobrew-c8750157dfe6
MIT License
364 stars 24 forks source link

add cachedData #107

Closed kevincobain2000 closed 1 year ago

kevincobain2000 commented 1 year ago
-> Request to get git tags for version
  -> read existing /tmp/cache
  -> unmarshal(response)
  -> !OK
  -> return results from /tmp/cache (if any)
-> Request to get git tags for version
  -> read existing /tmp/cache
  -> unmarshal(response)
  -> OK
  -> write /tmp/cache results
  -> return results from http response
codecov-commenter commented 1 year ago

Codecov Report

Merging #107 (96db0db) into master (8455f6e) will increase coverage by 0.07%. The diff coverage is 52.77%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master     #107      +/-   ##
==========================================
+ Coverage   50.59%   50.66%   +0.07%     
==========================================
  Files           1        1              
  Lines         508      527      +19     
==========================================
+ Hits          257      267      +10     
- Misses        214      222       +8     
- Partials       37       38       +1     
Impacted Files Coverage Δ
gobrew.go 50.66% <52.77%> (+0.07%) :arrow_up:
kevincobain2000 commented 1 year ago

Fixes issue like this https://github.com/kevincobain2000/gobrew/actions/runs/5036076816/jobs/9031983134

juev commented 1 year ago

And I have a question, in what cases does this error occur?

By default, api calls without authorization are limited to 60 requests. With 5000 authorization. That is, almost 10 times more.

If the problem occurs when using Github, maybe it makes sense to set authorization? Or is it also not enough?