allegro / bigcache

Efficient cache for gigabytes of data written in Go.
http://allegro.tech/2016/03/writing-fast-cache-service-in-go.html
Apache License 2.0
7.51k stars 595 forks source link

Use errors.New instead of fmt.Errorf #370

Closed chenyahui closed 1 year ago

chenyahui commented 1 year ago

errors.New is more efficient than fmt.Errorf when format arg is not required

codecov-commenter commented 1 year ago

Codecov Report

Merging #370 (0017a4d) into main (caa3415) will decrease coverage by 0.51%. The diff coverage is 71.42%.

:exclamation: Current head 0017a4d differs from pull request most recent head daf3857. Consider uploading reports for the commit daf3857 to get more accurate results

: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.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #370      +/-   ##
==========================================
- Coverage   89.16%   88.66%   -0.51%     
==========================================
  Files          15       15              
  Lines         794      794              
==========================================
- Hits          708      704       -4     
- Misses         73       76       +3     
- Partials       13       14       +1     
Files Changed Coverage Δ
shard.go 90.49% <33.33%> (-1.53%) :arrow_down:
bigcache.go 92.96% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update caa3415...daf3857. Read the comment docs.