コード例 #1
0
ファイル: plugin.go プロジェクト: kyleconroy/revel
func (t TestRunnerPlugin) OnRoutesLoaded(router *revel.Router) {
	router.Routes = append([]*revel.Route{
		revel.NewRoute("GET", "/@tests", "TestRunner.Index", ""),
		revel.NewRoute("GET", "/@tests.list", "TestRunner.List", ""),
		revel.NewRoute("GET", "/@tests/public/{<.*>filepath}", "Static.ServeModule", "testrunner,public"),
		revel.NewRoute("GET", "/@tests/{suite}/{test}", "TestRunner.Run", ""),
	}, router.Routes...)
	fmt.Println("Go to /@tests to run the tests.")
}
コード例 #2
0
ファイル: plugin.go プロジェクト: rverton/revel
func (t TestRunnerPlugin) OnRoutesLoaded(router *revel.Router) {
	router.Routes = append([]*revel.Route{
		revel.NewRoute("GET", "/@tests", "TestRunner.Index"),
		revel.NewRoute("GET", "/@tests.list", "TestRunner.List"),
		revel.NewRoute("GET", "/@tests/public/", "staticDir:testrunner:public"),
		revel.NewRoute("GET", "/@tests/{suite}/{test}", "TestRunner.Run"),
	}, router.Routes...)
	fmt.Println("Go to /@tests to run the tests.")
}
コード例 #3
0
ファイル: plugin.go プロジェクト: kyleconroy/revel
func (t JobsPlugin) OnRoutesLoaded(router *revel.Router) {
	router.Routes = append([]*revel.Route{
		revel.NewRoute("GET", "/@jobs", "Jobs.Status", ""),
	}, router.Routes...)
	fmt.Println("Go to /@jobs to see job status.")
}