I want to cleanup my vendor folder in my golang project. What is the best way to go about this?
Asked
Active
Viewed 1,575 times
2 Answers
0
After good amount of looking around, I found that there is an easy one-line command to do this:
govendor remove +unused

Aki
- 3,709
- 2
- 29
- 37
-
At first, you need to install it by the `go get -u github.com/kardianos/govendor` command. – Majid Alaeinia May 29 '21 at 08:37
0
What about using this commands?
go mod tidy --> removes dependencies from go.mod
go mod vendor --> removes libraries from vendor
This will remove all unused libraries

Raul Lucaciu
- 132
- 7