common forge.Init()
This commit is contained in:
parent
d19f4a8911
commit
bb1df07910
19
config.go
19
config.go
|
@ -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
|
|
||||||
}
|
|
4
main.go
4
main.go
|
@ -28,9 +28,7 @@ func main() {
|
||||||
|
|
||||||
pp = arg.MustParse(&argv)
|
pp = arg.MustParse(&argv)
|
||||||
|
|
||||||
// read in forge info
|
forge = forgepb.Init()
|
||||||
cfg := configInit()
|
|
||||||
forge = forgepb.InitFromConfig(cfg)
|
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
// attempt to clone, returns *gitpb.Repo
|
// attempt to clone, returns *gitpb.Repo
|
||||||
|
|
Loading…
Reference in New Issue