예제 #1
0
파일: starter.go 프로젝트: ssrl/gon
func renderDefault(context gon.WebContext, ret []reflect.Value, controllerName string, actionName string) {
	if model, ok := ret[0].Interface().(mv.Model); ok {
		context.WriteString(mustache.RenderFile(APP_VIEW_PATH+controllerName+"/"+actionName+".m", model))
	} else if view, ok := ret[0].Interface().(mv.View); ok {
		actionName = view.String()
		context.WriteString(mustache.RenderFile(APP_VIEW_PATH + controllerName + "/" + actionName + ".m"))
	}
}
예제 #2
0
파일: starter.go 프로젝트: ssrl/gon
func renderWithActionName(context gon.WebContext, ret []reflect.Value, controllerName string) {
	model := ret[0].Interface().(mv.Model)
	view := ret[1].Interface().(mv.View)
	actionName := view.String()
	context.WriteString(mustache.RenderFile(APP_VIEW_PATH+controllerName+"/"+actionName+".m", model))
}
예제 #3
0
파일: starter.go 프로젝트: ssrl/gon
func renderRoot(context gon.WebContext) {
	context.WriteString(mustache.RenderFile(APP_VIEW_PATH + "main.m"))
}