diff options
| author | Jeff Carr <[email protected]> | 2024-11-20 13:43:26 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-20 13:43:26 -0600 |
| commit | 09f855910c9c5ebf146bd6ff1b00e911f7b850d5 (patch) | |
| tree | 63aa9a027eb4205eca8afdfa152609e26e8a5634 /forgeConfig/main.go | |
| parent | e14bc69169643c7f3eb3e31447657a877716eda4 (diff) | |
exposes memory corruption. need to fix
Diffstat (limited to 'forgeConfig/main.go')
| -rw-r--r-- | forgeConfig/main.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/forgeConfig/main.go b/forgeConfig/main.go index cdd70cf..81fe8bc 100644 --- a/forgeConfig/main.go +++ b/forgeConfig/main.go @@ -20,13 +20,23 @@ func main() { } if argv.List { log.Info(forgepb.RepoHeader()) - loop := repos.SortByName() // get the list of droplets + loop := repos.SortByName() // get the list of repos for loop.Scan() { r := loop.Repo() log.Info("repo:", r.Name, r.Gopath) } os.Exit(0) } + if argv.Update { + r := repos.FindByName(argv.Name) // find the repo + if r == nil { + log.Info("rep:", argv.Name, "not found") + os.Exit(-1) + } + r.Gopath = argv.GoPath + repos.ConfigSave() + os.Exit(0) + } if argv.Add { log.Info("going to add a new repo", argv.Name, argv.GoPath) new1 := new(forgepb.Repo) |
