summaryrefslogtreecommitdiff
path: root/all.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-13 02:21:25 -0600
committerJeff Carr <[email protected]>2024-12-13 02:21:25 -0600
commit214865f134363f1bd0465e91c143fc3c2ffdc001 (patch)
treea2423e45d02b3190617d468647782c0c2c81d720 /all.go
parentc3e3dfd20952acfdf58d018cf16b3c2cd8bc2ae3 (diff)
save and restore from git notes
Diffstat (limited to 'all.go')
-rw-r--r--all.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/all.go b/all.go
new file mode 100644
index 0000000..fbdafc7
--- /dev/null
+++ b/all.go
@@ -0,0 +1,32 @@
+package main
+
+import (
+ "fmt"
+)
+
+// rethink this. do not run on non-master git branches
+func doAll() {
+ if argv.All {
+ if forge.IsGoWork() {
+ var warning []string
+ warning = append(warning, "go-mod-clean --recursive may not work unless you are in ~/go/src")
+ warning = append(warning, "you can continue anyway, but it hasn't been tested as much.")
+ simpleStdin(true, warning)
+ }
+ var warning []string
+ warning = append(warning, "go-mod-clean will recreate go.mod and go.sum")
+ warning = append(warning, "because you have selected --recursive")
+ warning = append(warning, "this will redo _every_ repo. This is probably fine.")
+ warning = append(warning, fmt.Sprintf("You have %d total repositories in %s", forge.Repos.Len(), forge.GetGoSrc()))
+ warning = append(warning, "")
+ warning = append(warning, "However, this will also, at times, do:")
+ warning = append(warning, "")
+ warning = append(warning, "rm -rf ~/go/pkg/")
+ warning = append(warning, "rm -rf ~/.config/go-build/")
+ warning = append(warning, "")
+ warning = append(warning, "Which is also probably fine, but will clear all your build cache and go mod cache")
+ warning = append(warning, "")
+ simpleStdin(false, warning)
+ // purgeGoCaches()
+ }
+}