github.com/goplus/yap@v0.8.1/demo/classfile2_blog/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 get struct { 10 yap.Handler 11 *AppV2 12 } 13 type get_p_id struct { 14 yap.Handler 15 *AppV2 16 } 17 type AppV2 struct { 18 yap.AppV2 19 } 20 //line demo/classfile2_blog/main.yap:1 21 func (this *AppV2) MainEntry() { 22 //line demo/classfile2_blog/main.yap:1:1 23 this.Run(":8888") 24 } 25 func (this *AppV2) Main() { 26 yap.Gopt_AppV2_Main(this, new(get), new(get_p_id)) 27 } 28 //line demo/classfile2_blog/get.yap:1 29 func (this *get) Main(_gop_arg0 *yap.Context) { 30 this.Handler.Main(_gop_arg0) 31 //line demo/classfile2_blog/get.yap:1:1 32 this.Html__1(`<html><body>Hello, <a href="/p/123">YAP</a>!</body></html>`) 33 } 34 func (this *get) Classfname() string { 35 return "get" 36 } 37 //line demo/classfile2_blog/get_p_#id.yap:1 38 func (this *get_p_id) Main(_gop_arg0 *yap.Context) { 39 this.Handler.Main(_gop_arg0) 40 //line demo/classfile2_blog/get_p_#id.yap:1:1 41 this.Yap__1("article", map[string]string{"id": this.Gop_Env("id")}) 42 } 43 func (this *get_p_id) Classfname() string { 44 return "get_p_#id" 45 } 46 func main() { 47 new(AppV2).Main() 48 }