back to a common Init()

This commit is contained in:
Jeff Carr 2025-09-11 04:38:22 -05:00
parent ad1144efe5
commit 7cf1758a36
2 changed files with 1 additions and 23 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

@ -31,10 +31,7 @@ func main() {
me.myGui = prep.Gui() // prepares the GUI package for go-args me.myGui = prep.Gui() // prepares the GUI package for go-args
me.pp = arg.MustParse(&argv) me.pp = arg.MustParse(&argv)
// read in forge info me.forge = forgepb.Init()
cfg := configInit()
me.forge = forgepb.InitFromConfig(cfg)
me.found = new(gitpb.Repos) me.found = new(gitpb.Repos)
fhelp.CheckGoModCleanExit() fhelp.CheckGoModCleanExit()