diff options
Diffstat (limited to 'all.go')
| -rw-r--r-- | all.go | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -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() + } +} |
