Пример #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
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)
	}
}