github.com/goplus/yap@v0.8.1/demo/classfile_hello/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 AppV2 struct { 10 yap.AppV2 11 } 12 //line demo/classfile_hello/main.yap:1 13 func (this *AppV2) MainEntry() { 14 //line demo/classfile_hello/main.yap:1:1 15 this.Get("/", func(ctx *yap.Context) { 16 //line demo/classfile_hello/main.yap:2:1 17 ctx.Html__1(`<html><body>Hello, YAP!</body></html>`) 18 }) 19 //line demo/classfile_hello/main.yap:4:1 20 this.Get("/p/:id", func(ctx *yap.Context) { 21 //line demo/classfile_hello/main.yap:5:1 22 ctx.Json__1(map[string]string{"id": ctx.Param("id")}) 23 }) 24 //line demo/classfile_hello/main.yap:10:1 25 this.Run("localhost:8080") 26 } 27 func (this *AppV2) Main() { 28 yap.Gopt_AppV2_Main(this) 29 } 30 func main() { 31 new(AppV2).Main() 32 }