diff options
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) |
