Home > Article > Backend Development > Do we commit vendor folder changes?
I want to understand the vendor folder in the Go project.
I cloned a go repository and changed the code. But when I try to run the relevant tests, I get some error messages. After some googling I found out that I need to run some commands:
Organization module
Go to module supplier
Now the problem is gone, but I see a lot of files changed in the vendor folder.
is it acceptable?
Do I need to submit all these documents?
vendor
folder contains all dependencies for the project and therefore is not typically committed to the repository.
However, you should commit the go.mod
and go.sum
files if the library you depend on doesn't have anything sketchy (remove versions, sources, etc.) ## The #vendor folder should be fully reproducible from the
go.sum file.
vendor folder is rarely used. Most people don't use it natively either. Running
go mod download instead of
go modvendor will download the module into the modules directory on your system (default is $GOPATH/pkg).
documentation. Or view the entire Go module documentation https://www.php.cn/link/28538c394c36e4d5ea8ff5ad60562a93.
The above is the detailed content of Do we commit vendor folder changes?. For more information, please follow other related articles on the PHP Chinese website!