Skip to content

Commit

Permalink
Fixed go module import path
Browse files Browse the repository at this point in the history
  • Loading branch information
eko committed Dec 3, 2022
1 parent 5c06575 commit 4635b6a
Show file tree
Hide file tree
Showing 57 changed files with 100 additions and 100 deletions.
30 changes: 15 additions & 15 deletions README.md
Expand Up @@ -43,29 +43,29 @@ Here is what it brings in detail:
To begin working with the latest version of gocache, you can import the library in your project:

```go
go get github.com/eko/gocache/v4/lib
go get github.com/eko/gocache/lib/v4
```

and then, import the store(s) you want to use between all available ones:

```go
go get github.com/eko/gocache/v4/store/bigcache
go get github.com/eko/gocache/v4/store/freecache
go get github.com/eko/gocache/v4/store/go_cache
go get github.com/eko/gocache/v4/store/memcache
go get github.com/eko/gocache/v4/store/pegasus
go get github.com/eko/gocache/v4/store/redis
go get github.com/eko/gocache/v4/store/rediscluster
go get github.com/eko/gocache/v4/store/rueidis
go get github.com/eko/gocache/v4/store/ristretto
go get github.com/eko/gocache/store/bigcache/v4
go get github.com/eko/gocache/store/freecache/v4
go get github.com/eko/gocache/store/go_cache/v4
go get github.com/eko/gocache/store/memcache/v4
go get github.com/eko/gocache/store/pegasus/v4
go get github.com/eko/gocache/store/redis/v4
go get github.com/eko/gocache/store/rediscluster/v4
go get github.com/eko/gocache/store/rueidis/v4
go get github.com/eko/gocache/store/ristretto/v4
```

Then, simply use the following import statements:

```go
import (
"github.com/eko/gocache/v4/lib/cache"
"github.com/eko/gocache/v4/store/redis"
"github.com/eko/gocache/lib/v4/cache"
"github.com/eko/gocache/store/redis/v4"
)
```

Expand Down Expand Up @@ -387,9 +387,9 @@ package main

import (
"log"
"github.com/eko/gocache/v4/lib/generic"
"github.com/eko/gocache/v4/lib/cache"
"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/generic"
"github.com/eko/gocache/lib/v4/cache"
"github.com/eko/gocache/lib/v4/store"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions lib/cache/cache.go
Expand Up @@ -7,8 +7,8 @@ import (
"reflect"
"time"

"github.com/eko/gocache/v4/lib/codec"
"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/codec"
"github.com/eko/gocache/lib/v4/store"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions lib/cache/cache_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/cache/cache_test.go
Expand Up @@ -6,8 +6,8 @@ import (
"testing"
"time"

"github.com/eko/gocache/v4/lib/codec"
"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/codec"
"github.com/eko/gocache/lib/v4/store"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/cache/chain.go
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"time"

"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/store"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions lib/cache/chain_test.go
Expand Up @@ -7,8 +7,8 @@ import (
"testing"
"time"

"github.com/eko/gocache/v4/lib/codec"
"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/codec"
"github.com/eko/gocache/lib/v4/store"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions lib/cache/interface.go
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"time"

"github.com/eko/gocache/v4/lib/codec"
"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/codec"
"github.com/eko/gocache/lib/v4/store"
)

// CacheInterface represents the interface for all caches (aggregates, metric, memory, redis, ...)
Expand Down
2 changes: 1 addition & 1 deletion lib/cache/loadable.go
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"sync"

"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/store"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions lib/cache/metric.go
Expand Up @@ -3,8 +3,8 @@ package cache
import (
"context"

"github.com/eko/gocache/v4/lib/metrics"
"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/metrics"
"github.com/eko/gocache/lib/v4/store"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions lib/cache/metric_test.go
Expand Up @@ -6,9 +6,9 @@ import (
"testing"
"time"

"github.com/eko/gocache/v4/lib/codec"
"github.com/eko/gocache/v4/lib/metrics"
"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/codec"
"github.com/eko/gocache/lib/v4/metrics"
"github.com/eko/gocache/lib/v4/store"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/codec/codec.go
Expand Up @@ -5,7 +5,7 @@ import (
"sync"
"time"

"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/store"
)

// Stats allows to returns some statistics of codec usage
Expand Down
2 changes: 1 addition & 1 deletion lib/codec/codec_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/codec/codec_test.go
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/store"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/codec/interface.go
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"time"

"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/store"
)

// CodecInterface represents an instance of a cache codec
Expand Down
2 changes: 1 addition & 1 deletion lib/go.mod
@@ -1,4 +1,4 @@
module github.com/eko/gocache/v4/lib
module github.com/eko/gocache/lib/v4

go 1.19

Expand Down
4 changes: 2 additions & 2 deletions lib/marshaler/marshaler.go
Expand Up @@ -3,8 +3,8 @@ package marshaler
import (
"context"

"github.com/eko/gocache/v4/lib/cache"
"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/cache"
"github.com/eko/gocache/lib/v4/store"
"github.com/vmihailenco/msgpack"
)

Expand Down
4 changes: 2 additions & 2 deletions lib/marshaler/marshaler_test.go
Expand Up @@ -6,8 +6,8 @@ import (
"testing"
"time"

"github.com/eko/gocache/v4/lib/cache"
"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/cache"
"github.com/eko/gocache/lib/v4/store"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/vmihailenco/msgpack"
Expand Down
2 changes: 1 addition & 1 deletion lib/metrics/interface.go
@@ -1,6 +1,6 @@
package metrics

import "github.com/eko/gocache/v4/lib/codec"
import "github.com/eko/gocache/lib/v4/codec"

// MetricsInterface represents the metrics interface for all available providers
type MetricsInterface interface {
Expand Down
2 changes: 1 addition & 1 deletion lib/metrics/metrics_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/metrics/prometheus.go
@@ -1,7 +1,7 @@
package metrics

import (
"github.com/eko/gocache/v4/lib/codec"
"github.com/eko/gocache/lib/v4/codec"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
Expand Down
4 changes: 2 additions & 2 deletions lib/metrics/prometheus_test.go
Expand Up @@ -4,8 +4,8 @@ import (
"testing"
"time"

"github.com/eko/gocache/v4/lib/codec"
"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/codec"
"github.com/eko/gocache/lib/v4/store"
"github.com/golang/mock/gomock"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/testutil"
Expand Down
2 changes: 1 addition & 1 deletion store/bigcache/bigcache.go
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"time"

"github.com/eko/gocache/v4/lib/store"
"github.com/eko/gocache/lib/v4/store"
)

// BigcacheClientInterface represents a allegro/bigcache client
Expand Down
2 changes: 1 addition & 1 deletion store/bigcache/bigcache_bench_test.go
Expand Up @@ -8,7 +8,7 @@ import (
"time"

"github.com/allegro/bigcache/v3"
lib_store "github.com/eko/gocache/v4/lib/store"
lib_store "github.com/eko/gocache/lib/v4/store"
)

func BenchmarkBigcacheSet(b *testing.B) {
Expand Down
2 changes: 1 addition & 1 deletion store/bigcache/bigcache_test.go
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

lib_store "github.com/eko/gocache/v4/lib/store"
lib_store "github.com/eko/gocache/lib/v4/store"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
)
Expand Down
6 changes: 3 additions & 3 deletions store/bigcache/go.mod
@@ -1,15 +1,15 @@
module github.com/eko/gocache/v4/store/bigcache
module github.com/eko/gocache/store/bigcache/v4

go 1.19

require (
github.com/allegro/bigcache/v3 v3.1.0
github.com/eko/gocache/v4/lib v0.0.0
github.com/eko/gocache/lib/v4 v4.1.1
github.com/golang/mock v1.6.0
github.com/stretchr/testify v1.8.1
)

replace github.com/eko/gocache/v4/lib => ../../lib/
replace github.com/eko/gocache/lib/v4 => ../../lib/

require (
github.com/davecgh/go-spew v1.1.1 // indirect
Expand Down
2 changes: 1 addition & 1 deletion store/freecache/freecache.go
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"time"

lib_store "github.com/eko/gocache/v4/lib/store"
lib_store "github.com/eko/gocache/lib/v4/store"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion store/freecache/freecache_bench_test.go
Expand Up @@ -8,7 +8,7 @@ import (
"time"

"github.com/coocood/freecache"
lib_store "github.com/eko/gocache/v4/lib/store"
lib_store "github.com/eko/gocache/lib/v4/store"
)

func BenchmarkFreecacheSet(b *testing.B) {
Expand Down
2 changes: 1 addition & 1 deletion store/freecache/freecache_test.go
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

lib_store "github.com/eko/gocache/v4/lib/store"
lib_store "github.com/eko/gocache/lib/v4/store"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
)
Expand Down
6 changes: 3 additions & 3 deletions store/freecache/go.mod
@@ -1,10 +1,10 @@
module github.com/eko/gocache/v4/store/freecache
module github.com/eko/gocache/store/freecache/v4

go 1.19

require (
github.com/coocood/freecache v1.2.3
github.com/eko/gocache/v4/lib v0.0.0
github.com/eko/gocache/lib/v4 v4.1.1
github.com/golang/mock v1.6.0
github.com/stretchr/testify v1.8.1
)
Expand All @@ -17,4 +17,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/eko/gocache/v4/lib => ../../lib/
replace github.com/eko/gocache/lib/v4 => ../../lib/
6 changes: 3 additions & 3 deletions store/go_cache/go.mod
@@ -1,9 +1,9 @@
module github.com/eko/gocache/v4/store/go_cache
module github.com/eko/gocache/store/go_cache/v4

go 1.19

require (
github.com/eko/gocache/v4/lib v0.0.0
github.com/eko/gocache/lib/v4 v4.1.1
github.com/golang/mock v1.6.0
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/stretchr/testify v1.8.1
Expand All @@ -18,4 +18,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/eko/gocache/v4/lib => ../../lib/
replace github.com/eko/gocache/lib/v4 => ../../lib/
2 changes: 1 addition & 1 deletion store/go_cache/go_cache.go
Expand Up @@ -7,7 +7,7 @@ import (
"sync"
"time"

lib_store "github.com/eko/gocache/v4/lib/store"
lib_store "github.com/eko/gocache/lib/v4/store"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion store/go_cache/go_cache_bench_test.go
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

lib_store "github.com/eko/gocache/v4/lib/store"
lib_store "github.com/eko/gocache/lib/v4/store"
cache "github.com/patrickmn/go-cache"
)

Expand Down
2 changes: 1 addition & 1 deletion store/go_cache/go_cache_test.go
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

lib_store "github.com/eko/gocache/v4/lib/store"
lib_store "github.com/eko/gocache/lib/v4/store"
"github.com/golang/mock/gomock"
"github.com/patrickmn/go-cache"
"github.com/stretchr/testify/assert"
Expand Down

0 comments on commit 4635b6a

Please sign in to comment.