func main() { setupFlags() parseFlags() log := logging.GetLogger(opts.LogFile, opts.RemoteSyslog, opts.Syslog, opts.Debug, opts.Trace) if err := config.LoadConfig(configFile, cfg); err != nil { log.Fatalf("%s\n", err) } // opts - cli options passed to mq svgMgr, err := service.NewServiceManager(cfg, opts, log) if err != nil { log.Fatalf("%s\n", err) } svgMgr.Start() }
//"bytes" "fmt" //"net/http" "os" "testing" "github.com/vindalu/vindalu/config" "github.com/vindalu/vindalu/logging" ) var ( testCfgfile = "../etc/vindalu.json.sample" testInvCfg config.InventoryConfig testLogger = logging.GetLogger("", "", false, false, false) testInv *VindaluCore testCoreBa = NewBaseAsset("testtype", "test-ba") ) func TestMain(m *testing.M) { err := config.LoadConfig(testCfgfile, &testInvCfg) if err != nil { fmt.Println(err) os.Exit(1) } testInvCfg.Auth.GroupsFile = "../etc/local-groups.json.sample"