Golang github.com-acsellers-thoreni.Contextable类(方法)实例源码

下面列出了Golang github.com-acsellers-thoreni.Contextable 类(方法)源码代码实例,从而了解它的用法。

作者:acseller    项目:thoren   
// Default404 is the default 404 handler. If you want to change the content of the page,
// simply put a valid template file in templates/builtins/ with the name 404. This function
// will then use that template. If you wish to implement a custom function for this purpose,
// set the NotFound RoutingFunc on the Router for you application with your new RoutingFunc.
func Default404(ctx *thoreni.Contextable) {
	ctx.Render("Not Found")
}

作者:acseller    项目:thoreni-example   
func IndexHandler(ctx *thoreni.Contextable) {
	ctx.Render("posts/index")
}

作者:acseller    项目:thoreni-example   
func DeletePostsHandler(ctx *thoreni.Contextable) {
	ctx.Redirect("/posts")
}

作者:acseller    项目:thoreni-example   
func PostHandler(ctx *thoreni.Contextable) {
	ctx.Render("posts/show")
}

作者:acseller    项目:thoreni-example   
func ContactHandler(ctx *thoreni.Contextable) {
	ctx.RenderStatic("pages/contact")
}

作者:acseller    项目:thoreni-example   
func AboutHandler(ctx *thoreni.Contextable) {
	ctx.RenderStatic("pages/about")
}


问题


面经


文章

微信
公众号

扫码关注公众号