diff options
Diffstat (limited to 'repomap.go')
| -rw-r--r-- | repomap.go | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/repomap.go b/repomap.go deleted file mode 100644 index 6ab056a..0000000 --- a/repomap.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2017-2025 WIT.COM Inc. All rights reserved. -// Use of this source code is governed by the GPL 3.0 - -package main - -import ( - "os" - "strings" - - "go.wit.com/lib/gui/shell" - "go.wit.com/log" -) - -// -// go-clone everything from a gowebd repomap file (go.wit.com has examples) -// - -func repomap(filename string) { - log.DaemonMode(true) - - data, err := os.ReadFile(argv.RepoMap) - if err != nil { - log.Info("open repomap failed", err) - return - } - - for _, line := range strings.Split(string(data), "\n") { - if line == "" { - continue - } - if strings.HasPrefix(line, "#") { - continue - } - parts := strings.Fields(line) - gopath := parts[0] - repo := me.forge.FindByGoPath(gopath) - var cmd []string - if argv.Recursive { - cmd = []string{"go-clone", "--recursive", gopath} - } else { - cmd = []string{"go-clone", gopath} - } - if repo == nil { - if argv.DryRun { - log.Info("run:", cmd) - } else { - shell.RunRealtime(cmd) - } - } else { - log.Info("already ran:", cmd) - } - } -} |
