patchman/client/utils/getOSInfo_windows.go

29 lines
585 B
Go
Raw Normal View History

2023-10-22 16:11:13 +02:00
//go:build windows
package utils
import (
"git.jmbit.de/jmb/patchman/client/common"
"runtime"
)
// getWinOSInfo provides information about the Windows OS used
func GetOSInfo() common.OSInfo {
if OSInfoCache.OS != "" {
return OSInfoCache
}
var distribution string
var version string
var distributionLike []string
var kernelRelease string
return common.OSInfo{
OS: runtime.GOOS,
Distribution: distribution,
DistributionLike: distributionLike,
Version: version,
KernelRelease: kernelRelease,
Architecture: runtime.GOARCH,
}
}