summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-10 14:07:14 -0600
committerJeff Carr <[email protected]>2024-12-10 14:07:14 -0600
commit6cf28f0591c3a21d475ccfef76dd590747c4c6a7 (patch)
treeddadb2f3712ce96c0a2712f1ab1274b8f66f7a3f /argv.go
Day 1
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/argv.go b/argv.go
new file mode 100644
index 0000000..788f8ba
--- /dev/null
+++ b/argv.go
@@ -0,0 +1,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.
+`
+}