🎨 记录操作系统平台

This commit is contained in:
Liang Ding 2023-02-10 21:45:21 +08:00
parent 2a4fc32e50
commit 08641595ae
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 14 additions and 9 deletions

View file

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