2024-12-10 14:07:14 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
/*
|
|
|
|
this parses the command line arguements
|
|
|
|
*/
|
|
|
|
|
|
|
|
var argv args
|
|
|
|
|
|
|
|
type args struct {
|
2024-12-11 00:03:08 -06:00
|
|
|
Recursive bool `arg:"--recursive" default:"false" help:"clean every repo found in go/src or go.work"`
|
|
|
|
Auto bool `arg:"--auto" help:"don't approve via STDIN"`
|
2024-12-10 14:07:14 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
func (args) Version() string {
|
|
|
|
return "go-clean " + VERSION + " Built on " + BUILDTIME
|
|
|
|
}
|
|
|
|
|
|
|
|
func (a args) Description() string {
|
|
|
|
return `
|
|
|
|
This will:
|
|
|
|
|
|
|
|
* Remove your existing go.mod and go.sum files.
|
|
|
|
* Run 'go mod init' and 'go mod tidy'
|
|
|
|
* Trim your 'go.sum' file of missing entries
|
|
|
|
* Test that your binary still builds with 'go build'
|
|
|
|
(testing can only be done if you are working from ~/go/src)
|
|
|
|
|
|
|
|
* This tool is used by forge to also identify golang 'primative' libraries which
|
|
|
|
are libraries that are completely cleanly implemented and self-defined.
|
|
|
|
`
|
|
|
|
}
|