minor
This commit is contained in:
parent
f2ec2e74ee
commit
8b41d89ab2
8
init.go
8
init.go
|
@ -4,11 +4,9 @@ package forgepb
|
|||
|
||||
import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"go.wit.com/lib/config"
|
||||
"go.wit.com/lib/fhelp"
|
||||
"go.wit.com/lib/gui/shell"
|
||||
"go.wit.com/lib/protobuf/gitpb"
|
||||
"go.wit.com/log"
|
||||
)
|
||||
|
@ -27,7 +25,7 @@ func Init() *Forge {
|
|||
cfg := new(ForgeConfigs)
|
||||
err := config.ConfigLoad(cfg, "forge", "forge")
|
||||
if err != nil {
|
||||
log.Info("forge has not been configured yet")
|
||||
log.Info("forge has not been configured yet filename =", cfg.Filename)
|
||||
log.Info("go install go.wit.com/apps/forge@latest")
|
||||
os.Exit(-1)
|
||||
}
|
||||
|
@ -40,7 +38,7 @@ func InitByAppname(argname string) *Forge {
|
|||
cfg := new(ForgeConfigs)
|
||||
err := config.ConfigLoad(cfg, argname, "forge")
|
||||
if err != nil {
|
||||
log.Info("forge has not been configured yet")
|
||||
log.Info("forge has not been configured yet", cfg.Filename)
|
||||
log.Info("go install go.wit.com/apps/forge@latest")
|
||||
os.Exit(-1)
|
||||
}
|
||||
|
@ -49,6 +47,7 @@ func InitByAppname(argname string) *Forge {
|
|||
return f
|
||||
}
|
||||
|
||||
/*
|
||||
func (f *Forge) InitScan() {
|
||||
if f.hasFullScan {
|
||||
// duplicate time checking below. which one to keep?
|
||||
|
@ -80,6 +79,7 @@ func (f *Forge) InitScan() {
|
|||
}
|
||||
log.Log(INFO, "update() check took", shell.FormatDuration(time.Since(now)))
|
||||
}
|
||||
*/
|
||||
|
||||
func initFromConfig(cfg *ForgeConfigs) *Forge {
|
||||
f := new(Forge)
|
||||
|
|
Loading…
Reference in New Issue