38 lines
566 B
Go
38 lines
566 B
Go
|
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)
|
||
|
}
|
||
|
}
|