本文整理匯總了Golang中github.com/acsellers/thoreni.Contextable類的典型用法代碼示例。如果您正苦於以下問題:Golang Contextable類的具體用法?Golang Contextable怎麽用?Golang Contextable使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Contextable類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Default404
// 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")
}
示例2: IndexHandler
func IndexHandler(ctx *thoreni.Contextable) {
ctx.Render("posts/index")
}
示例3: DeletePostsHandler
func DeletePostsHandler(ctx *thoreni.Contextable) {
ctx.Redirect("/posts")
}
示例4: PostHandler
func PostHandler(ctx *thoreni.Contextable) {
ctx.Render("posts/show")
}
示例5: ContactHandler
func ContactHandler(ctx *thoreni.Contextable) {
ctx.RenderStatic("pages/contact")
}
示例6: AboutHandler
func AboutHandler(ctx *thoreni.Contextable) {
ctx.RenderStatic("pages/about")
}