common forge.Init()

This commit is contained in:
Jeff Carr 2025-09-11 04:46:40 -05:00
parent 8e67e31bbe
commit b46996bac2
2 changed files with 1 additions and 22 deletions

View File

@ -1,19 +0,0 @@
package main
import (
"go.wit.com/lib/config"
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/log"
)
// sent via -ldflags
func configInit() *forgepb.ForgeConfigs {
configs := new(forgepb.ForgeConfigs)
err := config.ConfigLoad(configs, "forge", "forge")
if err != nil {
log.Info("This tool requires your repos be scanned by forge first")
badExit(err)
}
return configs
}

View File

@ -7,9 +7,7 @@ import (
// go will sit here until the window exits
func main() {
// read in forge info
cfg := configInit()
forge := forgepb.InitFromConfig(cfg)
forge := forgepb.Init()
all := forge.Repos.SortByFullPath()
for all.Scan() {