From 3895519f25a603b6b75b54c0d9ad57b7128045ac Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 2 Dec 2024 06:59:56 -0600 Subject: start developing this for real --- list.go | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 list.go (limited to 'list.go') 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) + } +} -- cgit v1.2.3