Validator: invalid version: go.mod has non-....v10 module path

Created on 5 Dec 2019  路  5Comments  路  Source: go-playground/validator

Package version:

v10

Issue, Question or Enhancement:

go get gopkg.in/go-playground/validator.v10 gives following error

go get gopkg.in/go-playground/validator.v10: gopkg.in/go-playground/[email protected]: invalid version: go.mod has non-....v10 module path "github.com/go-playground/validator/v10" at revision v10.0.1

btw no issue with go get github.com/go-playground/validator/v10

Thanks

good first issue help wanted

Most helpful comment

Got the point.
I think better add some note in https://gopkg.in/go-playground/validator.v10 and https://godoc.org/gopkg.in/go-playground/validator.v10 .
Thanks and keep up the good work!

All 5 comments

v10 was the migration to using go modules which was a breaking change and gopkg.in should no longer be used in the import path and why the github.com path works as expected.

Go modules has been a huge ecosystem breaking change which is not compatible with many, if not all, previous versioning tools including gopkg.in

Got the point.
I think better add some note in https://gopkg.in/go-playground/validator.v10 and https://godoc.org/gopkg.in/go-playground/validator.v10 .
Thanks and keep up the good work!

facing same issue while deploying my code. Things do work in my local machine though...

Do we have any plans to fix it?

@nipungupta8137 Quick fix, use github.com/go-playground/validator/v10 instead gopkg.in/go-playground/validator.v10

This issue was resolved. Should be closed.

Was this page helpful?
0 / 5 - 0 ratings