github.com/goplus/yap@v0.8.1/demo/classfile_nestetemplate/gop_autogen.go (about) 1 // Code generated by gop (Go+); DO NOT EDIT. 2 3 package main 4 5 import "github.com/goplus/yap" 6 7 const _ = true 8 9 type blog struct { 10 yap.App 11 } 12 //line demo/classfile_nestetemplate/blog_yap.gox:1 13 func (this *blog) MainEntry() { 14 //line demo/classfile_nestetemplate/blog_yap.gox:1:1 15 this.Get("/", func(ctx *yap.Context) { 16 //line demo/classfile_nestetemplate/blog_yap.gox:2:1 17 ctx.Html__1(`<html><body>Hello, <a href="/p/123">YAP</a>!</body></html>`) 18 }) 19 //line demo/classfile_nestetemplate/blog_yap.gox:4:1 20 this.Get("/p/:id", func(ctx *yap.Context) { 21 //line demo/classfile_nestetemplate/blog_yap.gox:5:1 22 ctx.Yap__1("blog", map[string]string{"Id": ctx.Param("id")}) 23 }) 24 //line demo/classfile_nestetemplate/blog_yap.gox:10:1 25 this.Run(":8888") 26 } 27 func (this *blog) Main() { 28 yap.Gopt_App_Main(this) 29 } 30 func main() { 31 new(blog).Main() 32 }