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 }