diff options
| author | Jeff Carr <[email protected]> | 2024-11-29 22:38:22 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-29 22:38:22 -0600 |
| commit | 57cbde285b380d9146b3ee46116e5fa90f292444 (patch) | |
| tree | d770cc5ae649b5db239ae321b5aafff6e2739824 /init.go | |
| parent | f750b96cc55d42f4edfcd324ef9878525d0cf428 (diff) | |
InitBox() for autotypist
Diffstat (limited to 'init.go')
| -rw-r--r-- | init.go | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -35,3 +35,29 @@ func Init(f *forgepb.Forge, g *gui.Node) *RepoList { me.Enable() return me } + +func InitBox(f *forgepb.Forge, newbox *gui.Node) *RepoList { + me = new(RepoList) + + // make a window with a table of all the repos + me.AutotypistView(newbox) + + me.Enable() + me.forge = f + + me.viewName = "autotypist" + + repos := me.forge.Repos.SortByPath() + for repos.Scan() { + repo := repos.Next() + if me.forge.IsReadOnly(repo.GoPath) { + log.Info("repo scan readonly directory:", repo.FullPath) + } else { + log.Info("repo scan writable directory:", repo.FullPath) + me.AddRepo(repo) + } + } + + me.Enable() + return me +} |
