go-mod-clean/argv.go

27 lines
678 B
Go
Raw Normal View History

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 `
2024-12-11 01:14:24 -06:00
go-clean will try to verify your go.* files are using the newest package versions
2024-12-10 14:07:14 -06:00
2024-12-11 01:14:24 -06:00
* Recreate go.* with 'go mod init' and 'go mod tidy'
* Check that the most recent master branch versions are used
* Try to trim go.sum of non-existent entries
2024-12-10 14:07:14 -06:00
`
}