1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| // Package controller - $PF_GENERATE_ONCE$ package controller
import ( "github.com/valyala/fasthttp"
"{{{ .Package }}}/app" "{{{ .Package }}}/app/controller/cutil" "{{{ .Package }}}/app/util" "{{{ .Package }}}/views" )
var homeContent = util.ValueMap{ util.AppKey: util.AppName, "urls": map[string]string{ "home": "/", }, }
func Home(rc *fasthttp.RequestCtx) { Act("home", rc, func(as *app.State, ps *cutil.PageState) (string, error) { ps.Data = homeContent return Render(rc, as, &views.Home{}, ps) }) }
|