diff options
| author | Jeff Carr <[email protected]> | 2024-12-02 06:59:56 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-02 06:59:56 -0600 |
| commit | 3895519f25a603b6b75b54c0d9ad57b7128045ac (patch) | |
| tree | 0a0477f48af81bc54f804407b2925589e3303c1e /list.go | |
| parent | 8afc4c713576b3509e15942dfd3dae5e8b8b8906 (diff) | |
start developing this for real
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) + } +} |
