back to a common Init()

This commit is contained in:
Jeff Carr 2025-09-11 04:38:33 -05:00
parent c638819b00
commit 96ea435179
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

@ -42,9 +42,7 @@ func main() {
gitMap = make(map[string]*gitpb.Repo) gitMap = make(map[string]*gitpb.Repo)
repoMap = make(map[string]string) repoMap = make(map[string]string)
// read in forge info forge = forgepb.Init()
cfg := configInit()
forge = forgepb.InitFromConfig(cfg)
// parse the repomap file // parse the repomap file
readRepomap() readRepomap()