优化frpc.toml导出逻辑,从前端依赖库改为自建设计
This commit is contained in:
@@ -18,7 +18,7 @@ import (
|
||||
var embeddedFrpc embed.FS
|
||||
|
||||
//go:embed frpc.tmpl
|
||||
var frpcTemplateContent string
|
||||
var FrpcTemplateContent string
|
||||
|
||||
var (
|
||||
cachedFrpcPath string
|
||||
@@ -127,11 +127,11 @@ func GenerateFrpcConfig() error {
|
||||
tmplContent = string(content)
|
||||
} else {
|
||||
// 读取失败时回退到 embed
|
||||
tmplContent = frpcTemplateContent
|
||||
tmplContent = FrpcTemplateContent
|
||||
}
|
||||
} else {
|
||||
// 外部文件不存在,使用 embed 中的模板
|
||||
tmplContent = frpcTemplateContent
|
||||
tmplContent = FrpcTemplateContent
|
||||
}
|
||||
// ===== 核心改动结束 =====
|
||||
|
||||
|
||||
Reference in New Issue
Block a user