chore: standardize project comments in English

This commit is contained in:
eezd committed 2026-10-26 22:52:12 +08:00
1 parent a874a39ea5
commit ccb16acbea
167 files changed
+820 -820

No files matched your search

+4 -4
View File
@@ -1,7 +1,7 @@
//go:build !dev
// Package web 把前端构建产物(web/dist,由 pnpm build 生成)嵌入 Go 二进制。
// 开发时使用 -tags dev,前端由 Vite 开发服务器提供,见 embed_dev.go。
// Package web embeds the frontend build (web/dist, generated by pnpm build) in the Go binary.
// Use -tags dev during development; Vite serves the frontend, as described in embed_dev.go.
package web
import (
@@ -17,12 +17,12 @@ var dist embed.FS
func Dist() fs.FS {
sub, err := fs.Sub(dist, "dist")
if err != nil {
panic(err) // 路径为编译期常量,不会失败
panic(err) // The compile-time constant path cannot fail.
}
return sub
}
// BuildVersion 与页面入口使用同一构建标识,生产产物缺失时明确失败。
// BuildVersion shares the page entry's build identifier and fails explicitly when production output is missing.
func BuildVersion() (string, error) {
html, err := fs.ReadFile(Dist(), "index.html")
if err != nil {