Coder Social home page Coder Social logo

v4 issues - can't import about gocache HOT 6 CLOSED

eko avatar eko commented on May 30, 2024 1
v4 issues - can't import

from gocache.

Comments (6)

eko avatar eko commented on May 30, 2024 1

Cool, thanks to you all for your quick feedback.

I close this issue but feel free to reopen if you still have any issue.

from gocache.

fbozzo-sniptech avatar fbozzo-sniptech commented on May 30, 2024

Same here :(

from gocache.

eko avatar eko commented on May 30, 2024

Hi,

Thank you and sorry about that.

Imports should now be functional by replacing github.com/eko/gocache/v4/lib with github.com/eko/gocache/lib/v4.

Indeed, the version number of a Go module should be a suffix of the module name.

$ go get github.com/eko/gocache/lib/[email protected]

Also note that store module names have also beed updated:

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

Could you please confirm it's working now?

from gocache.

ddliu avatar ddliu commented on May 30, 2024

Same here with go mod tidy error, to reproduce:

package main

import (
	"github.com/eko/gocache/lib/v4/marshaler"
)

func main() {
	marshaler.New(nil)
}

go.mod file:

module app

go 1.19

require github.com/eko/gocache/lib/v4 v4.1.1

require (
	github.com/beorn7/perks v1.0.1 // indirect
	github.com/cespare/xxhash/v2 v2.1.2 // indirect
	github.com/golang/mock v1.6.0 // indirect
	github.com/golang/protobuf v1.5.2 // indirect
	github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
	github.com/prometheus/client_golang v1.14.0 // indirect
	github.com/prometheus/client_model v0.3.0 // indirect
	github.com/prometheus/common v0.37.0 // indirect
	github.com/prometheus/procfs v0.8.0 // indirect
	github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
	golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9 // indirect
	golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
	golang.org/x/sys v0.1.0 // indirect
	google.golang.org/appengine v1.6.6 // indirect
	google.golang.org/protobuf v1.28.1 // indirect
)

Error message when run go mod tidy:

go mod tidy
go: finding module for package github.com/eko/gocache/v4/lib/metrics
go: finding module for package github.com/eko/gocache/v4/lib/cache
go: finding module for package github.com/eko/gocache/v4/lib/codec
go: finding module for package github.com/eko/gocache/v4/lib/store
app imports
        github.com/eko/gocache/lib/v4/marshaler tested by
        github.com/eko/gocache/lib/v4/marshaler.test imports
        github.com/eko/gocache/v4/lib/cache: module github.com/eko/gocache@latest found (v1.2.0), but does not contain package github.com/eko/gocache/v4/lib/cache
app imports
        github.com/eko/gocache/lib/v4/marshaler tested by
        github.com/eko/gocache/lib/v4/marshaler.test imports
        github.com/eko/gocache/v4/lib/store: module github.com/eko/gocache@latest found (v1.2.0), but does not contain package github.com/eko/gocache/v4/lib/store
app imports
        github.com/eko/gocache/lib/v4/marshaler imports
        github.com/eko/gocache/lib/v4/cache tested by
        github.com/eko/gocache/lib/v4/cache.test imports
        github.com/eko/gocache/v4/lib/codec: module github.com/eko/gocache@latest found (v1.2.0), but does not contain package github.com/eko/gocache/v4/lib/codec
app imports
        github.com/eko/gocache/lib/v4/marshaler imports
        github.com/eko/gocache/lib/v4/cache tested by
        github.com/eko/gocache/lib/v4/cache.test imports
        github.com/eko/gocache/v4/lib/metrics: module github.com/eko/gocache@latest found (v1.2.0), but does not contain package github.com/eko/gocache/v4/lib/metrics

from gocache.

eko avatar eko commented on May 30, 2024

Thank you @ddliu,

It seems that there is a cache on Go sum database, I just created released v4.1.2 and it seems to be fixed now. Could you please confirm?

from gocache.

ddliu avatar ddliu commented on May 30, 2024

v4.1.2 works for me, thanks.

from gocache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.