在GO中找不到软件包“ gopkg.in/validator.v2”错误

I am new to GO language.

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 uses git or hg to fetch a package, so you have to install it. For windows you can use this link.