common forge.Init()
This commit is contained in:
parent
8d5fa8609e
commit
cdca120140
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(nil, err)
|
|
||||||
}
|
|
||||||
return configs
|
|
||||||
}
|
|
4
main.go
4
main.go
|
@ -31,9 +31,7 @@ func main() {
|
||||||
prep.Bash(ARGNAME, argv.DoAutoComplete) // todo: make this: prep.Bash(argv)
|
prep.Bash(ARGNAME, argv.DoAutoComplete) // todo: make this: prep.Bash(argv)
|
||||||
pp = arg.MustParse(&argv)
|
pp = arg.MustParse(&argv)
|
||||||
|
|
||||||
// read in forge info
|
forge = forgepb.Init()
|
||||||
cfg := configInit()
|
|
||||||
forge = forgepb.InitFromConfig(cfg)
|
|
||||||
|
|
||||||
// figure out what directory we are running in
|
// figure out what directory we are running in
|
||||||
check := findPwdRepo()
|
check := findPwdRepo()
|
||||||
|
|
Loading…
Reference in New Issue