Gin: Not currently possible to install gin because of upstream dependency break

Created on 14 Jan 2020  路  3Comments  路  Source: gin-gonic/gin

Validator dropped support for version numbers in the import statement, so it is currently impossible to use gin:

../../../gin-gonic/gin/binding/default_validator.go:11:2: cannot find package "github.com/go-playground/validator/v10" in any of:
    /usr/local/go/src/github.com/go-playground/validator/v10 (from $GOROOT)
    /Users/james/go/src/github.com/go-playground/validator/v10 (from $GOPATH)

The "/v10" suffix needs to be dropped.

Most helpful comment

Getting this error on go1.14.2 as well.

All 3 comments

This seems to be fixed. Tested with go get -u on go 1.13.6

`
go: downloading github.com/json-iterator/go v1.1.7
go: downloading golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
go: extracting github.com/json-iterator/go v1.1.7
go: downloading github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742
go: downloading github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421
go: extracting github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421
go: extracting golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
go: extracting github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742
go: finding github.com/go-playground/validator/v10 v10.1.0
go: finding gopkg.in/yaml.v2 v2.2.7
go: finding github.com/mattn/go-isatty v0.0.11
go: finding github.com/modern-go/reflect2 v1.0.1
go: finding github.com/modern-go/concurrent latest
go: finding golang.org/x/sys latest
go: finding github.com/json-iterator/go v1.1.9
go: downloading github.com/json-iterator/go v1.1.9
go: downloading github.com/mattn/go-isatty v0.0.11
go: downloading gopkg.in/yaml.v2 v2.2.7
go: downloading github.com/go-playground/validator/v10 v10.1.0
go: extracting github.com/json-iterator/go v1.1.9
go: downloading github.com/modern-go/reflect2 v1.0.1
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: extracting github.com/mattn/go-isatty v0.0.11
go: downloading golang.org/x/sys v0.0.0-20200117145432-59e60aa80a0c
go: extracting gopkg.in/yaml.v2 v2.2.7
go: extracting github.com/modern-go/reflect2 v1.0.1
**

go: extracting github.com/go-playground/validator/v10 v10.1.0

**
go: extracting github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: extracting golang.org/x/sys v0.0.0-20200117145432-59e60aa80a0c
`

Getting this error on go1.14.2 as well.

Getting this error on go1.15 too. Any plan to fix it? Any workaround?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kekemuyu picture kekemuyu  路  3Comments

cxk280 picture cxk280  路  3Comments

Bloomca picture Bloomca  路  3Comments

nxvl picture nxvl  路  3Comments

frederikhors picture frederikhors  路  3Comments