summaryrefslogtreecommitdiff
path: root/argv.go
blob: 788f8ba3022e39d160e508abb6ec2f14675f736a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package main

/*
	this parses the command line arguements
*/

var argv args

type args struct {
	Repo string `arg:"positional"                     help:"gopath (otherwise uses "pwd")"`
}

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.
`
}