diff options
Diffstat (limited to 'forgeConfig/main.go')
| -rw-r--r-- | forgeConfig/main.go | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/forgeConfig/main.go b/forgeConfig/main.go index 20df841..434f222 100644 --- a/forgeConfig/main.go +++ b/forgeConfig/main.go @@ -1,7 +1,6 @@ package main import ( - "fmt" "os" "go.wit.com/lib/protobuf/forgepb" @@ -20,39 +19,41 @@ func main() { } if argv.List { log.Info(forgepb.RepoHeader()) - loop := repos.SortByName() // get the list of repos + loop := repos.SortByPath() // get the list of repos for loop.Scan() { r := loop.Repo() - log.Info("repo:", r.Name, r.GoPath) + log.Info("repo:", r.GoPath) } os.Exit(0) } if argv.Update { - if repos.UpdateGoPath(argv.Name, argv.GoPath) { - // save updated config file - repos.ConfigSave() - } + /* + if repos.UpdateGoPath(argv.Name, argv.GoPath) { + // save updated config file + repos.ConfigSave() + } + */ os.Exit(0) } if argv.Add { - log.Info("going to add a new repo", argv.Name, argv.GoPath) + log.Info("going to add a new repo", argv.GoPath) new1 := new(forgepb.Repo) - new1.Name = argv.Name new1.GoPath = argv.GoPath if repos.Append(new1) { - log.Info("added", new1.Name, "ok") + log.Info("added", new1.GoPath, "ok") } else { - log.Info("added", new1.Name, "failed") + log.Info("added", new1.GoPath, "failed") os.Exit(-1) } repos.ConfigSave() os.Exit(0) } - testMemoryCorruption(repos) + // testMemoryCorruption(repos) repos.ConfigSave() } +/* // this fucks shit up func testMemoryCorruption(all *forgepb.Repos) *forgepb.Repos { new1 := new(forgepb.Repo) @@ -110,3 +111,4 @@ func testMemoryCorruption(all *forgepb.Repos) *forgepb.Repos { fmt.Println("packages are:", len(all.Repos)) return all } +*/ |
