mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-11-04 16:40:21 +00:00
Update release and test workflows
This commit is contained in:
1 parent
538501b0e5
commit
05eb0e9bf2
4 files changed
+9
-5
No files matched your search
@@ -16,6 +16,7 @@ import (
|
||||
"github.com/nicksnyder/go-i18n/v2/i18n"
|
||||
|
||||
"github.com/naiba/nezha/pkg/mygin"
|
||||
"github.com/naiba/nezha/pkg/utils"
|
||||
"github.com/naiba/nezha/resource"
|
||||
"github.com/naiba/nezha/service/singleton"
|
||||
)
|
||||
@@ -29,9 +30,11 @@ func ServeWeb(port uint) *http.Server {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
tmpl, err = tmpl.ParseGlob("resource/template/**/*.html")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
if utils.IsFileExists("resource/template") {
|
||||
tmpl, err = tmpl.ParseGlob("resource/template/**/*.html")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
r.SetHTMLTemplate(tmpl)
|
||||
if singleton.Conf.Debug {
|
||||
|
||||
Reference in new issue
Block a user