示例#1
0
文件: main.go 项目: cyx/busl
func main() {
	conf, err := parseFlags()
	if err != nil {
		usage()
		os.Exit(1)
	}

	busltee.OpenLogs(conf.LogFile, conf.LogPrefix)
	defer busltee.CloseLogs()

	if exitCode := busltee.Run(conf.URL, conf.Args, conf); exitCode != 0 {
		os.Exit(exitCode)
	}
}
示例#2
0
文件: main.go 项目: heroku/busl
func main() {
	cmdConf, publisherConf, err := parseFlags()
	if err != nil {
		usage()
		os.Exit(1)
	}

	if cmdConf.RollbarToken != "" {
		rollbar.Token = cmdConf.RollbarToken
		rollbar.Environment = cmdConf.RollbarEnvironment
		rollbar.ServerRoot = "github.com/heroku/busl"
	}

	busltee.OpenLogs(publisherConf.LogFile, publisherConf.LogPrefix)
	defer busltee.CloseLogs()

	if exitCode := busltee.Run(publisherConf.URL, publisherConf.Args, publisherConf); exitCode != 0 {
		os.Exit(exitCode)
	}
}