Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a error when importing "github.com/go-playground/validator/v10" #2151

Closed
daghlny opened this issue Nov 25, 2019 · 5 comments
Closed

Comments

@daghlny
Copy link

daghlny commented Nov 25, 2019

I think it should be "github.com/go-playground/validator.v10"

@daghlny
Copy link
Author

daghlny commented Nov 25, 2019

I use govendor for a project, and it cannot fetch "github.com/go-playground/validator/v10".

@thinkerou
Copy link
Member

thinkerou commented Nov 25, 2019

@daghlny master branch? now the master branch don't support govendor. #2148

@ivan-californias
Copy link

Same issue here:

go get -v -u github.com/gin-gonic/gin 
github.com/gin-gonic/gin (download) 
github.com/gin-contrib/sse (download) 
github.com/go-playground/validator (download) 
package github.com/go-playground/validator/v10: cannot find package "github.com/go-playground/validator/v10" in any of: 
    /usr/lib/golang/src/github.com/go-playground/validator/v10 (from $GOROOT) 
...

@daghlny
Copy link
Author

daghlny commented Nov 29, 2019

Ok,

@daghlny master branch? now the master branch don't support govendor. #2148

Thanks

@daghlny daghlny closed this as completed Nov 29, 2019
@alexxsanchezm
Copy link

Hello, I got this issue when deploying my project to google cloud, since I read this v10 directory not longer exists, I tried to reinstall gin to get a fresh version but got the same error.
So I though the v10 is just an old transition version for the validator and maybe a symlink can fix it.

And yes, I know it's too hacky and I don't really know the side effects, but this what I did:

$cd $GOPATH/src/github.com/go-playground/validator/
$ln -s . v10

After that I just run my deploy script and worked. I think the underlaying problem gin is referencing that old v10 and needs to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants