mirror of
https://github.com/fankes/komari-agent.git
synced 2025-12-13 05:01:14 +08:00
feat: 优化 CPU 和磁盘信息获取,增强对 Server 版本的支持,改进终端关闭逻辑
This commit is contained in:
@@ -21,6 +21,10 @@ func OSName() string {
|
||||
if err != nil {
|
||||
return "Microsoft Windows"
|
||||
}
|
||||
// 如果是 Server 版本,直接返回原始名称
|
||||
if strings.Contains(productName, "Server") {
|
||||
return productName
|
||||
}
|
||||
|
||||
// Windows 11
|
||||
majorVersion, _, err := key.GetIntegerValue("CurrentMajorVersionNumber")
|
||||
|
||||
Reference in New Issue
Block a user