go-mod-clean

command module
v0.0.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

README

go-mod-clean

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.
  • stores go.mod and go.sum with autogen:go.mod tags in 'git notes'

Install go-mod-clean

go install go.wit.com/apps/go-mod-clean@latest

How it works

go-mod-clean is very simple. It will run 'go build' with GO111MODULE=off. In this mode, 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!

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL