fixes for new autogenpb
This commit is contained in:
parent
0600f54488
commit
23887a155e
13
init.go
13
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue