當前位置: 首頁>>代碼示例>>Golang>>正文


Golang Events.ShutdownEngine方法代碼示例

本文整理匯總了Golang中github.com/fabiofalci/sconsify/sconsify.Events.ShutdownEngine方法的典型用法代碼示例。如果您正苦於以下問題:Golang Events.ShutdownEngine方法的具體用法?Golang Events.ShutdownEngine怎麽用?Golang Events.ShutdownEngine使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在github.com/fabiofalci/sconsify/sconsify.Events的用法示例。


在下文中一共展示了Events.ShutdownEngine方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: assertNoNextTrack

func assertNoNextTrack(events *sconsify.Events, finished chan bool) {
	events.NextPlay()

	// playing spotify shutdown here
	<-events.ShutdownSpotifyUpdates()
	events.ShutdownEngine()

	<-finished
}
開發者ID:KoehlerClem,項目名稱:sconsify,代碼行數:9,代碼來源:noui_test.go

示例2: assertShutdown

func assertShutdown(t *testing.T, ui sconsify.UserInterface, events *sconsify.Events, finished chan bool) {
	go ui.Shutdown()

	// playing spotify shutdown here
	<-events.ShutdownSpotifyUpdates()
	events.ShutdownEngine()

	if !<-finished {
		t.Errorf("Not properly finished")
	}
}
開發者ID:KoehlerClem,項目名稱:sconsify,代碼行數:11,代碼來源:noui_test.go

示例3: waitForMockEvents

func waitForMockEvents(events *sconsify.Events) {
	for {
		select {
		case <-events.PlayUpdates():
		case <-events.PauseUpdates():
		case <-events.ReplayUpdates():
		case <-events.ShutdownSpotifyUpdates():
			events.ShutdownEngine()
		case <-events.SearchUpdates():
		}
	}
}
開發者ID:simonwoerpel,項目名稱:sconsify,代碼行數:12,代碼來源:spotify_mock.go

示例4: Initialise

func Initialise(webApiAuth bool, username string, pass []byte, events *sconsify.Events, playlistFilter *string, preferredBitrate *string) {
	if err := initialiseSpotify(webApiAuth, username, pass, events, playlistFilter, preferredBitrate); err != nil {
		fmt.Printf("Error: %v\n", err)
		events.ShutdownEngine()
	}
}
開發者ID:rdbrdd,項目名稱:sconsify,代碼行數:6,代碼來源:spotify.go

示例5: Initialise

func Initialise(initConf *SpotifyInitConf, username string, pass []byte, events *sconsify.Events) {
	if err := initialiseSpotify(initConf, username, pass, events); err != nil {
		fmt.Printf("Error: %v\n", err)
		events.ShutdownEngine()
	}
}
開發者ID:ialbors,項目名稱:sconsify,代碼行數:6,代碼來源:spotify.go

示例6: Initialise

func Initialise(username string, pass []byte, events *sconsify.Events, playlistFilter *string) {
	if err := initialiseSpotify(username, pass, events, playlistFilter); err != nil {
		fmt.Printf("Error: %v\n", err)
		events.ShutdownEngine()
	}
}
開發者ID:gitter-badger,項目名稱:sconsify,代碼行數:6,代碼來源:spotify.go


注:本文中的github.com/fabiofalci/sconsify/sconsify.Events.ShutdownEngine方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。