2

I want to cleanup my vendor folder in my golang project. What is the best way to go about this?

Aki
  • 3,709
  • 2
  • 29
  • 37

2 Answers2

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
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