Skip to content

Commit

Permalink
autogen
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Jan 19, 2024
1 parent 3e2d8fe commit ebded9d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions demo/classfile_blog/gop_autogen.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import "github.com/goplus/yap"
type blog struct {
yap.App
}
//line classfile_blog/blog_yap.gox:1
//line demo/classfile_blog/blog_yap.gox:1
func (this *blog) MainEntry() {
//line classfile_blog/blog_yap.gox:1:1
//line demo/classfile_blog/blog_yap.gox:1:1
this.Get("/p/:id", func(ctx *yap.Context) {
//line classfile_blog/blog_yap.gox:2:1
//line demo/classfile_blog/blog_yap.gox:2:1
ctx.Yap__1("article", map[string]string{"id": ctx.Param("id")})
})
//line classfile_blog/blog_yap.gox:7:1
this.Run__1(":8080")
//line demo/classfile_blog/blog_yap.gox:7:1
this.Run(":8080")
}
func main() {
yap.Gopt_App_Main(new(blog))
Expand Down
14 changes: 7 additions & 7 deletions demo/classfile_hello/gop_autogen.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ import "github.com/goplus/yap"
type hello struct {
yap.App
}
//line classfile_hello/hello_yap.gox:1
//line demo/classfile_hello/hello_yap.gox:1
func (this *hello) MainEntry() {
//line classfile_hello/hello_yap.gox:1:1
//line demo/classfile_hello/hello_yap.gox:1:1
this.Get("/p/:id", func(ctx *yap.Context) {
//line classfile_hello/hello_yap.gox:2:1
//line demo/classfile_hello/hello_yap.gox:2:1
ctx.Json__1(map[string]string{"id": ctx.Param("id")})
})
//line classfile_hello/hello_yap.gox:6:1
//line demo/classfile_hello/hello_yap.gox:6:1
this.Handle("/", func(ctx *yap.Context) {
//line classfile_hello/hello_yap.gox:7:1
//line demo/classfile_hello/hello_yap.gox:7:1
ctx.Html__1(`<html><body>Hello, <a href="/p/123">Yap</a>!</body></html>`)
})
//line classfile_hello/hello_yap.gox:10:1
this.Run__1(":8080")
//line demo/classfile_hello/hello_yap.gox:10:1
this.Run(":8080")
}
func main() {
yap.Gopt_App_Main(new(hello))
Expand Down

0 comments on commit ebded9d

Please sign in to comment.