go-mod-clean/README.md

22 lines
751 B
Markdown
Raw Normal View History

# go-mod-clean
2024-12-10 14:07:14 -06:00
This is a hack to experiement with trimming unused entries from the go.sum files.
Since go.sum files need to be recursively processed, this attempts to remove
unused entries. There are all sorts of real world reasons on why this
needs to be done sometimes.
* go-mod-clean tries to remove uneeded entries from the go.sum file.
* You must run go-mod-clean in ~/go/src for this to work.
2024-12-10 14:07:14 -06:00
# Install go-mod-clean
2024-12-10 14:07:14 -06:00
go install go.wit.com/apps/go-mod-clean@latest
2024-12-10 14:07:14 -06:00
# How it works
go-mod-clean is very simple. It will run 'go build' with GO111MODULE=off. In this mode,
2024-12-10 14:07:14 -06:00
go will compile directly based on the 'import' paths. It simply parses the errors
from 'go build' and makes sure the appropriate entries are in the go.sum file.
Thats it!