Closed khanakia closed 4 years ago
Thanks for reporting the issue! I have fixed the README. go get github.com/go-ozzo/ozzo-validation
should be fine.
@qiangxue
There is one more issue when installing the go get github.com/go-ozzo/ozzo-validation
It is not installing the pkg dependecy github.com/asaskevich/govalidator
because of which validation giving error.
So how to auto install the pkg depedency ?
Actually the instruction on using go get
to install packages is a bit outdated. If you use go mod
, it will help you automatically install all needed dependencies.
@qiangxue I do not understand can you point me the exact commands please it will be helpful. Thanks
I have checked that article already. I am not talking about building modules.
I am talking about ozzo-validation which requires govalidator as dependency. So when i do go get github.com/go-ozzo/ozzo-validation
it does not installs the govalidator automatically.
If you are using go modules, then you don't need to explicitly "go get" the dependent modules as they will be automatically retrieved when you build your project.
But what about using the ozzo-validation in normal project where i do not have modules. So will i have to install the govalidator manually always ?
github.com/asaskevich/govalidator
I was talking about normal projects that have dependent modules such as ozzo-validation. If you use "go mod" to manage the dependent modules, you don't need to manually install the dependent modules.
I am getting an error while using go mod
command please check the below error
Lucians-MacBook-Pro:jeoga_go khanakia$ go mod download github.com/go-ozzo/ozzo-validation
module github.com/go-ozzo/ozzo-validation: not a known dependency
That's not a right way of using go mod. Please check the blog article above in detail.
I understand I will read the article in more detail. Thanks :)
Hi,
I am trying to install the package and getting error when i run the following command
go get github.com/go-ozzo/ozzo-validation/v4
ERROR