From a59d31c0810fe0c3a8d5ba801791afc0b7fe0102 Mon Sep 17 00:00:00 2001 From: xushiwei Date: Mon, 8 Jan 2024 17:30:11 +0800 Subject: [PATCH] mv .yap => _yap.html --- demo/blog/yap/{article.yap => article_yap.html} | 0 demo/blog_emb/yap/{article.yap => article_yap.html} | 0 demo/classfile_blog/gop_autogen.go | 6 +++--- demo/classfile_blog/yap/{article.yap => article_yap.html} | 0 demo/classfile_hello/gop_autogen.go | 6 +++--- yap.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename demo/blog/yap/{article.yap => article_yap.html} (100%) rename demo/blog_emb/yap/{article.yap => article_yap.html} (100%) rename demo/classfile_blog/yap/{article.yap => article_yap.html} (100%) diff --git a/demo/blog/yap/article.yap b/demo/blog/yap/article_yap.html similarity index 100% rename from demo/blog/yap/article.yap rename to demo/blog/yap/article_yap.html diff --git a/demo/blog_emb/yap/article.yap b/demo/blog_emb/yap/article_yap.html similarity index 100% rename from demo/blog_emb/yap/article.yap rename to demo/blog_emb/yap/article_yap.html diff --git a/demo/classfile_blog/gop_autogen.go b/demo/classfile_blog/gop_autogen.go index 084a028..36d36c9 100644 --- a/demo/classfile_blog/gop_autogen.go +++ b/demo/classfile_blog/gop_autogen.go @@ -2,11 +2,11 @@ package main import "github.com/goplus/yap" -type blog_yap struct { +type blog struct { yap.App } //line demo/classfile_blog/blog_yap.gox:1 -func (this *blog_yap) MainEntry() { +func (this *blog) MainEntry() { //line demo/classfile_blog/blog_yap.gox:1:1 this.Get("/p/:id", func(ctx *yap.Context) { //line demo/classfile_blog/blog_yap.gox:2:1 @@ -16,5 +16,5 @@ func (this *blog_yap) MainEntry() { this.Run__1(":8080") } func main() { - yap.Gopt_App_Main(new(blog_yap)) + yap.Gopt_App_Main(new(blog)) } diff --git a/demo/classfile_blog/yap/article.yap b/demo/classfile_blog/yap/article_yap.html similarity index 100% rename from demo/classfile_blog/yap/article.yap rename to demo/classfile_blog/yap/article_yap.html diff --git a/demo/classfile_hello/gop_autogen.go b/demo/classfile_hello/gop_autogen.go index fa731d9..67047ab 100644 --- a/demo/classfile_hello/gop_autogen.go +++ b/demo/classfile_hello/gop_autogen.go @@ -2,11 +2,11 @@ package main import "github.com/goplus/yap" -type hello_yap struct { +type hello struct { yap.App } //line demo/classfile_hello/hello_yap.gox:1 -func (this *hello_yap) MainEntry() { +func (this *hello) MainEntry() { //line demo/classfile_hello/hello_yap.gox:1:1 this.Get("/p/:id", func(ctx *yap.Context) { //line demo/classfile_hello/hello_yap.gox:2:1 @@ -21,5 +21,5 @@ func (this *hello_yap) MainEntry() { this.Run__1(":8080") } func main() { - yap.Gopt_App_Main(new(hello_yap)) + yap.Gopt_App_Main(new(hello)) } diff --git a/yap.go b/yap.go index 81dbe4b..86ead81 100644 --- a/yap.go +++ b/yap.go @@ -85,7 +85,7 @@ func (p *Engine) templ(path string) (t Template, err error) { } t, ok := p.tpls[path] if !ok { - t, err = ParseFSFile(p.fs, path+".yap") + t, err = ParseFSFile(p.fs, path+"_yap.html") if err != nil { return }