docs(agent): 统一中文注释并补充部署文档
将代码与测试注释改为中文以符合仓库规范;新增中文部署指南、 示例配置,并完善构建脚本对 VERSION 注入的说明。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// TestDefaultConfigUsesLocalhostAndSaneIntervals verifies safe local defaults.
|
||||
// TestDefaultConfigUsesLocalhostAndSaneIntervals 验证默认配置使用本地监听地址与合理的采集间隔。
|
||||
func TestDefaultConfigUsesLocalhostAndSaneIntervals(t *testing.T) {
|
||||
cfg := Default()
|
||||
|
||||
@@ -21,7 +21,7 @@ func TestDefaultConfigUsesLocalhostAndSaneIntervals(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestLoadAppliesEnvironmentOverrides verifies environment variables override defaults.
|
||||
// TestLoadAppliesEnvironmentOverrides 验证环境变量可覆盖默认配置。
|
||||
func TestLoadAppliesEnvironmentOverrides(t *testing.T) {
|
||||
t.Setenv("MFD_AGENT_LISTEN", "127.0.0.1:9090")
|
||||
t.Setenv("MFD_AGENT_REPORT_ENABLED", "true")
|
||||
@@ -48,7 +48,7 @@ func TestLoadAppliesEnvironmentOverrides(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestLoadJSONConfigFile verifies JSON config files are parsed into Config.
|
||||
// TestLoadJSONConfigFile 验证可从 JSON 配置文件解析 Config。
|
||||
func TestLoadJSONConfigFile(t *testing.T) {
|
||||
file, err := os.CreateTemp(t.TempDir(), "config-*.json")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user