docs(agent): 统一中文注释并补充部署文档

将代码与测试注释改为中文以符合仓库规范;新增中文部署指南、
示例配置,并完善构建脚本对 VERSION 注入的说明。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
codex
2026-05-19 02:30:49 +00:00
parent 89d5e27874
commit 877e4cf41d
28 changed files with 608 additions and 226 deletions

View File

@@ -9,30 +9,30 @@ import (
"mfd-monitor-agent/internal/config"
)
// unsupportedManager reports service lifecycle operations as unsupported on this platform.
// unsupportedManager 在本平台将服务生命周期操作报告为不支持。
type unsupportedManager struct{}
// newManager returns a manager that fails all service operations on unsupported platforms.
// newManager 返回在不支持平台上对所有服务操作均失败的管理器。
func newManager() Manager {
return unsupportedManager{}
}
// Install reports that service installation is unsupported on this platform.
// Install 报告本平台不支持服务安装。
func (unsupportedManager) Install(string, config.Config, InstallOptions) error {
return fmt.Errorf("service install is not implemented for %s", runtime.GOOS)
}
// Uninstall reports that service removal is unsupported on this platform.
// Uninstall 报告本平台不支持服务卸载。
func (unsupportedManager) Uninstall(config.Config) error {
return fmt.Errorf("service uninstall is not implemented for %s", runtime.GOOS)
}
// Start reports that service start is unsupported on this platform.
// Start 报告本平台不支持服务启动。
func (unsupportedManager) Start(config.Config) error {
return fmt.Errorf("service start is not implemented for %s", runtime.GOOS)
}
// Stop reports that service stop is unsupported on this platform.
// Stop 报告本平台不支持服务停止。
func (unsupportedManager) Stop(config.Config) error {
return fmt.Errorf("service stop is not implemented for %s", runtime.GOOS)
}