首次提交:初始化项目代码

This commit is contained in:
sunct
2026-07-31 15:24:14 +08:00
commit 8d3c97bd01
73 changed files with 11720 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
package main
import (
"embed"
"net/http"
"github.com/gin-gonic/gin"
)
//go:embed web
var webAssets embed.FS
func serveHTML(c *gin.Context, name string) {
content, err := webAssets.ReadFile(name)
if err != nil {
c.String(http.StatusNotFound, "not found")
return
}
c.Data(http.StatusOK, "text/html; charset=utf-8", content)
}