仓库自包含化:Docker/CI/文档/规范入库,路由分组拆分
CI / test (push) Successful in 15s

This commit is contained in:
Wang Defa
2026-07-09 19:18:04 +08:00
parent b9a3e97e84
commit 3e0389c1e9
83 changed files with 20241 additions and 248 deletions
+11
View File
@@ -0,0 +1,11 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OCI Portal</title>
</head>
<body>
<p>前端产物未嵌入:请从前端仓库 Release 下载 dist.zip 解压至此目录(或本地构建前端后拷入),此文件为仓库占位。</p>
</body>
</html>
+19
View File
@@ -0,0 +1,19 @@
// Package webui 承载前端构建产物的 go:embed 嵌入。
// dist 由构建脚本从 oci-portal-dash/dist 拷入覆盖;
// 仓库只提交占位 index.html,保证裸 clone 后 go build 可过。
package webui
import (
"embed"
"io/fs"
)
// all: 前缀连同 _ / . 开头文件一并嵌入(vite 产物含下划线开头的 chunk)。
//
//go:embed all:dist
var distFS embed.FS
// Dist 返回以 dist 为根的只读文件系统,供 HTTP 层直接伺服。
func Dist() (fs.FS, error) {
return fs.Sub(distFS, "dist")
}