El Ingeniero
El Ingeniero

Reputation: 61

How can I build a Go project without access to "go get"?

How to provide dependencies for go project, when I can only download the dependencies via browser?

I manually placed dependencies at GOPATH, but still go build is trying to reach internet to download dependencies

Upvotes: 3

Views: 1790

Answers (1)

novalagung
novalagung

Reputation: 11502

It's recommended to use Go Modules to manage a project and its dependencies. Go modules also have the vendor feature.

When vendor is enabled, local copy of your dependencies will be stored in vendor folder within your project. So then when you transfer the whole source code into the server, you don't need to download the dependencies again, since it's already included in the project.

Upvotes: 2

Related Questions