common forge.Init()
This commit is contained in:
parent
8e67e31bbe
commit
b46996bac2
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
|
@ -7,9 +7,7 @@ import (
|
||||||
|
|
||||||
// go will sit here until the window exits
|
// go will sit here until the window exits
|
||||||
func main() {
|
func main() {
|
||||||
// read in forge info
|
forge := forgepb.Init()
|
||||||
cfg := configInit()
|
|
||||||
forge := forgepb.InitFromConfig(cfg)
|
|
||||||
|
|
||||||
all := forge.Repos.SortByFullPath()
|
all := forge.Repos.SortByFullPath()
|
||||||
for all.Scan() {
|
for all.Scan() {
|
||||||
|
|
Loading…
Reference in New Issue