diff options
| author | Jeff Carr <[email protected]> | 2024-11-28 18:27:38 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-28 18:27:38 -0600 |
| commit | be0378f5486184b69b5da59461786477d753b8a3 (patch) | |
| tree | d11001460150ee998feb66a3052d2034f71815d4 /init.go | |
| parent | 8bf3997c81db88d8401db28c86f701be014442c2 (diff) | |
add a test example
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'init.go')
| -rw-r--r-- | init.go | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -0,0 +1,32 @@ +package repolist + +import ( + "go.wit.com/lib/protobuf/forgepb" + "go.wit.com/gui" + "go.wit.com/log" +) + +func (rl *RepoList) Init(f *forgepb.Forge) { + if rl == nil { + rl = new(RepoList) + } + me = rl + // todo: this code sucks. fix it soon + me.mainWindow = gui.NewWindow("builds and uploads all the packages") + me.mainbox = me.mainWindow.NewBox("bw hbox", true) + + // make a window with a table of all the repos + me = AutotypistView(me.mainbox) + + me.Enable() + me.forge = f + + repos := me.forge.Repos.SortByPath() + for repos.Scan() { + repo := repos.Next() + log.Info("repo scan directory:", repo.FullPath) + me.AddRepo(repo) + } + + me.Enable() +} |
