func main() {
	infrastructure.ProcessSconsifyrc()

	fmt.Println("Sconsify - your awesome Spotify music service in a text-mode interface.")
	events := sconsify.InitialiseEvents()

	go mock.Initialise(events)

	go testSequence()
	ui := ui.InitialiseConsoleUserInterface(events)
	sconsify.StartMainLoop(events, ui, false)
	println(output.String())
}
func main() {
	runTest := flag.Bool("run-test", false, "Run the test sequence.")
	flag.Parse()

	fmt.Println("Sconsify - your awesome Spotify music service in a text-mode interface.")
	events := sconsify.InitialiseEvents()

	infrastructure.InitialiseLogger()
	defer infrastructure.CloseLogger()

	go mock.Initialise(events)

	if *runTest {
		go runTests()
	}

	ui := ui.InitialiseConsoleUserInterface(events, false)
	sconsify.StartMainLoop(events, ui, false)
	println(output.String())
	sleep() // otherwise gocui eventually fails to quit properly
}