goldie
goldie copied to clipboard
Cannot go get v2 via modules
Hi, I'm trying to install goldie to project with modules. And error about incompatible version appears. Could you help me get around this problem?
> go get github.com/sebdah/[email protected]
go: finding github.com/sebdah/goldie v2.0.0
go get github.com/sebdah/[email protected]: github.com/sebdah/[email protected]: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2
go version go1.13.4 darwin/amd64
@vetcher What does your projects go.mod
file look like?
module mzsrv
go 1.13
require (
github.com/BurntSushi/toml v0.3.1
github.com/antihax/optional v1.0.0
github.com/beorn7/perks v1.0.1 // indirect
github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261 // indirect
github.com/getsentry/raven-go v0.2.0
github.com/go-pg/pg v8.0.6+incompatible
github.com/gopherjs/gopherjs v0.0.0-20190915194858-d3ddacdb130f // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/labstack/echo v3.3.10+incompatible
github.com/labstack/gommon v0.3.0 // indirect
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.10 // indirect
github.com/nlopes/slack v0.6.0
github.com/onsi/ginkgo v1.10.3 // indirect
github.com/onsi/gomega v1.7.1 // indirect
github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v1.0.0
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect
github.com/prometheus/common v0.7.0 // indirect
github.com/prometheus/procfs v0.0.5 // indirect
github.com/robfig/cron/v3 v3.0.0
github.com/smartystreets/assertions v0.0.0-20190401211740-f487f9de1cd3 // indirect
github.com/smartystreets/goconvey v1.6.3
github.com/snabb/sitemap v1.0.0
github.com/stretchr/testify v1.4.0
github.com/valyala/fasttemplate v1.1.0 // indirect
github.com/xorcare/golden v0.6.0
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect
golang.org/x/net v0.0.0-20191021144547-ec77196f6094 // indirect
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae // indirect
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898
google.golang.org/appengine v1.6.5 // indirect
mellium.im/sasl v0.2.1 // indirect
)
@vetcher Could you give it a try now?
> go get github.com/sebdah/goldie/v2
go: finding github.com/sebdah/goldie/v2 v2.2.0
go get github.com/sebdah/goldie/v2: module github.com/sebdah/goldie@upgrade found (v1.0.0), but does not contain package github.com/sebdah/goldie/v2
=(
And also
> go get github.com/sebdah/goldie/[email protected]
go: finding github.com/sebdah/goldie/v2 v2.2.0
go: finding github.com/sebdah/goldie v2.2.0
go get github.com/sebdah/goldie/[email protected]: github.com/sebdah/[email protected]: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2
go get github.com/sebdah/goldie/v2
works for me 🤷♂