top | item 23226221

(no title)

JoshuaRLi | 5 years ago

go mod init github.com/your/project

Then, go get -v will download your dependencies to GOPATH, and (re)generate go.mod, go.sum. For info on how to update dependencies, read `go help get`.

When using modules (presence of a valid go.mod file), GOPATH won't be used for resolving imports. So you don't have to actually work in GOPATH anymore, dependencies are just stored there.

discuss

order

No comments yet.