🎨 操作系统平台版本信息

This commit is contained in:
Liang Ding 2023-03-25 17:23:22 +08:00
parent 5caf532fd6
commit 7b87dcf0f6
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 7 additions and 11 deletions

View file

@ -23,11 +23,11 @@ import (
"github.com/siyuan-note/logging"
)
func GetOSPlatform() (plat, ver string) {
plat, _, ver, err := host.PlatformInformation()
func GetOSPlatform() (plat string) {
plat, _, _, err := host.PlatformInformation()
if nil != err {
logging.LogWarnf("get os platform failed: %s", err)
return "Unknown", ""
return "Unknown"
}
return
}