// Run runs the event loop processing with given handler
Run runs the event loop processing with given handler
// Run runs the event loop processing with given handler
func Run(conf *config.Config) {
	var eventHandler handlers.Handler
	switch {
	case len(conf.Handler.Slack.Channel) > 0 || len(conf.Handler.Slack.Token) > 0:
		eventHandler = new(slack.Slack)
	default:
		eventHandler = new(handlers.Default)
	}
	if err := eventHandler.Init(conf); err != nil {
		log.Fatal(err)
	}
	controller.Controller(conf, eventHandler)
}
func Run ( conf * config . Config ) { var eventHandler handlers . Handler switch { case len ( conf . Handler . Slack . Channel ) > 0 || len ( conf . Handler . Slack . Token ) > 0 : eventHandler = new ( slack . Slack ) default : eventHandler = new ( handlers . Default ) } if err := eventHandler . Init ( conf ) ; err != nil { log . Fatal ( err ) } controller . Controller ( conf , eventHandler ) }
Run runs the event loop processing with given handler
Run runs the event loop processing with given handler
//TODO: temporary fix eventHandler = slack. Will add more later. //eventHandler = new(slack.Slack)