summaryrefslogtreecommitdiff
path: root/list.go
diff options
context:
space:
mode:
Diffstat (limited to 'list.go')
-rw-r--r--list.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/list.go b/list.go
new file mode 100644
index 0000000..3cfe9c3
--- /dev/null
+++ b/list.go
@@ -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)
+ }
+}