From 23887a155ef6e4b512085b5a109118d8c678bb7d Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 12 Jan 2025 20:05:46 -0600 Subject: fixes for new autogenpb --- init.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/init.go b/init.go index 29c8fe1..121a481 100644 --- a/init.go +++ b/init.go @@ -50,8 +50,7 @@ func Init() *Forge { return f } -// only init's the protobuf. intended to not scan or change anything -func InitPB() *Forge { +func DetermineGoPath() *Forge { f := new(Forge) // TODO: rethink this but it works for now @@ -80,6 +79,10 @@ func InitPB() *Forge { // print out the settings that will be used log.Log(INFO, "forgepb.Init() FORGE_CONFIG", os.Getenv("FORGE_CONFIG")) + return f +} + +func (f *Forge) InitPB() { // load the ~/.config/forge/ config f.Config = new(ForgeConfigs) if err := f.Config.ConfigLoad(); err != nil { @@ -93,6 +96,12 @@ func InitPB() *Forge { } f.Repos = new(gitpb.Repos) f.Repos.ConfigLoad() +} + +// only init's the protobuf. intended to not scan or change anything +func InitPB() *Forge { + f := DetermineGoPath() + f.InitPB() return f } -- cgit v1.2.3