diff --git a/.gitignore b/.gitignore index 3b982bf..c208ae3 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ # Go workspace file go.work* +gop_autogen*.go diff --git a/demo/classfile_blog/gop_autogen.go b/demo/classfile_blog/gop_autogen.go deleted file mode 100644 index 2f3641d..0000000 --- a/demo/classfile_blog/gop_autogen.go +++ /dev/null @@ -1,20 +0,0 @@ -package main - -import "github.com/goplus/yap" - -type blog struct { - yap.App -} -//line classfile_blog/blog_yap.gox:1 -func (this *blog) MainEntry() { -//line classfile_blog/blog_yap.gox:1:1 - this.Get("/p/:id", func(ctx *yap.Context) { -//line 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") -} -func main() { - yap.Gopt_App_Main(new(blog)) -} diff --git a/demo/classfile_hello/gop_autogen.go b/demo/classfile_hello/gop_autogen.go deleted file mode 100644 index 54e6ff0..0000000 --- a/demo/classfile_hello/gop_autogen.go +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import "github.com/goplus/yap" - -type hello struct { - yap.App -} -//line classfile_hello/hello_yap.gox:1 -func (this *hello) MainEntry() { -//line classfile_hello/hello_yap.gox:1:1 - this.Get("/p/:id", func(ctx *yap.Context) { -//line 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 - this.Handle("/", func(ctx *yap.Context) { -//line classfile_hello/hello_yap.gox:7:1 - ctx.Html__1(`Hello, Yap!`) - }) -//line classfile_hello/hello_yap.gox:10:1 - this.Run__1(":8080") -} -func main() { - yap.Gopt_App_Main(new(hello)) -} diff --git a/demo/go.mod b/demo/go.mod index 84d69d5..69808f5 100644 --- a/demo/go.mod +++ b/demo/go.mod @@ -4,4 +4,4 @@ go 1.18 require github.com/goplus/yap v0.6.0 //gop:class -// replace github.com/goplus/yap => ../ +replace github.com/goplus/yap => ../