Repository: allegro/bigcache
Pull request #278 (2021-04-26 10:53:48)

Update example from v2 to v3

codecov-commenter: # [Codecov](https://codecov.io/gh/allegro/bigcache/pull/278?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) Report
> Merging [#278](https://codecov.io/gh/allegro/bigcache/pull/278?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) (b41d65d) into [master](https://codecov.io/gh/allegro/bigcache/commit/d8e805294edbe0f69b9bbd961af9b6c443fa514c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) (d8e8052) will **decrease** coverage by `0.62%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/allegro/bigcache/pull/278/graphs/tree.svg?width=650&height=150&src=pr&token=NRx0gXD6he&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)](https://codecov.io/gh/allegro/bigcache/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

```diff
@@            Coverage Diff             @@
##           master     #278      +/-   ##
==========================================
- Coverage   87.14%   86.52%   -0.63%     
==========================================
  Files          15       15              
  Lines         638      638              
==========================================
- Hits          556      552       -4     
- Misses         68       71       +3     
- Partials       14       15       +1     
```


| [Impacted Files](https://codecov.io/gh/allegro/bigcache/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | |
|---|---|---|
| [server/server.go](https://codecov.io/gh/allegro/bigcache/pull/278/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2VydmVyL3NlcnZlci5nbw==) | `29.03% <ø> (ø)` | |
| [shard.go](https://codecov.io/gh/allegro/bigcache/pull/278/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2hhcmQuZ28=) | `84.93% <ø> (-1.83%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/allegro/bigcache/pull/278?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/allegro/bigcache/pull/278?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Last update [d8e8052...b41d65d](https://codecov.io/gh/allegro/bigcache/pull/278?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None).


Patch:
diff --git a/README.md b/README.md
index a2bc788..59ab7fa 100644
--- a/README.md
+++ b/README.md
@@ -106,7 +106,7 @@ go version go1.13 linux/amd64
 go test -bench=. -benchmem -benchtime=4s ./... -timeout 30m
 goos: linux
 goarch: amd64
-pkg: github.com/allegro/bigcache/v2/caches_bench
+pkg: github.com/allegro/bigcache/v3/caches_bench
 BenchmarkMapSet-8                     	12999889	       376 ns/op	     199 B/op	       3 allocs/op
 BenchmarkConcurrentMapSet-8           	 4355726	      1275 ns/op	     337 B/op	       8 allocs/op
 BenchmarkFreeCacheSet-8               	11068976	       703 ns/op	     328 B/op	       2 allocs/op
@@ -122,7 +122,7 @@ BenchmarkBigCacheGetParallel-8        	60547064	        86.1 ns/op	     152 B/op
 BenchmarkFreeCacheGetParallel-8       	50701280	       147 ns/op	     136 B/op	       3 allocs/op
 BenchmarkConcurrentMapGetParallel-8   	27353288	       175 ns/op	      24 B/op	       2 allocs/op
 PASS
-ok  	github.com/allegro/bigcache/v2/caches_bench	256.257s
+ok  	github.com/allegro/bigcache/v3/caches_bench	256.257s
 ```
 
 Writes and reads in bigcache are faster than in freecache.
diff --git a/go.mod b/go.mod
index 982b4b1..1eea1f4 100644
--- a/go.mod
+++ b/go.mod
@@ -1,3 +1,3 @@
-module github.com/allegro/bigcache/v2
+module github.com/allegro/bigcache/v3
 
-go 1.12
+go 1.16
diff --git a/server/server.go b/server/server.go
index 4d110bf..8c11ca6 100644
--- a/server/server.go
+++ b/server/server.go
@@ -8,7 +8,7 @@ import (
 	"os"
 	"strconv"
 
-	"github.com/allegro/bigcache/v2"
+	"github.com/allegro/bigcache/v3"
 )
 
 const (
diff --git a/shard.go b/shard.go
index 3f08d5d..cd352a1 100644
--- a/shard.go
+++ b/shard.go
@@ -5,7 +5,7 @@ import (
 	"sync"
 	"sync/atomic"
 
-	"github.com/allegro/bigcache/v2/queue"
+	"github.com/allegro/bigcache/v3/queue"
 )
 
 type onRemoveCallback func(wrappedEntry []byte, reason RemoveReason)


Test patch:
diff --git a/examples_test.go b/examples_test.go
index f447072..ccc513a 100644
--- a/examples_test.go
+++ b/examples_test.go
@@ -5,7 +5,7 @@ import (
 	"log"
 	"time"
 
-	"github.com/allegro/bigcache/v2"
+	"github.com/allegro/bigcache/v3"
 )
 
 func Example() {
diff --git a/server/server_test.go b/server/server_test.go
index c3c43a0..88afb33 100644
--- a/server/server_test.go
+++ b/server/server_test.go
@@ -9,7 +9,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/allegro/bigcache/v2"
+	"github.com/allegro/bigcache/v3"
 )
 
 const (