diff options
Diffstat (limited to 'list.go')
| -rw-r--r-- | list.go | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -0,0 +1,37 @@ +package main + +import ( + "os" + + "go.wit.com/log" +) + +func list() { + if argv.ListConf { + me.forge.ConfigPrintTable() + os.Exit(0) + } + + if argv.List { + repos := me.forge.Repos.SortByGoPath() + for repos.Scan() { + repo := repos.Next() + if !repo.IsValid() { + log.Printf("%10s %-50s", "old?", repo.GetGoPath()) + continue + } + log.Printf("%10s %-50s", repo.RepoType(), repo.GetGoPath()) + } + os.Exit(0) + } + + if argv.GetMine { + log.Printf("get mine %s", me.forge.GetGoSrc()) + os.Exit(0) + } + + if argv.GetFav { + log.Printf("get favorites") + os.Exit(0) + } +} |
