When I am trying to build my Go project in Windows by using
go build
, its giving an error,
api.go:7:2: cannot find package "gopkg.in/validator.v2" in any of:
C:\Go\src\gopkg.in\validator.v2 (from $GOROOT)
C:\Home\GO..\src\gopkg.in\validator.v2 (from $GOPATH)
How to add this package to my project?
When I tried to add the above package by,
go get gopkg.in\validator.v2
then its giving another error like,
go: missing Git command. See https://golang.org/s/gogetcmd package gopkg.in/validator.v2: exec: "git": executable file not found in %PATH%
go get
. – Volker