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")) } }
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)) }
func renderRoot(context gon.WebContext) { context.WriteString(mustache.RenderFile(APP_VIEW_PATH + "main.m")) }