1
1
12rbah2020-02-01 08:01:55
go
12rbah, 2020-02-01 08:01:55

How to properly save a project with a large number of third-party libraries?

I asked this question, let's say that the project uses 10-15 libraries from github, which are periodically updated and sometimes you need to transfer this project to other machines, how to save the project so that the versions of the libraries match?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladislav, 2020-02-01
@ghostiam

Use go modules
At the root of the project, execute
go mod init
Done.
Dependencies then pull up on another computer
go mod download
Read more
https://blog.golang.org/using-go-modules

A
Alexander Melentyev, 2020-02-02
@asmelentyev

It is necessary to list all dependencies in go.mod, then initiate them using go mod tiny or go mod vendor

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question