patchman/client/utils/getOSInfo_windows.go

29 lines
578 B
Go
Raw Permalink Normal View History

2023-10-22 16:11:13 +02:00
//go:build windows
package utils
import (
2023-10-26 18:31:57 +02:00
"git.jmbit.de/jmb/patchman/common"
2023-10-22 16:11:13 +02:00
"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,
}
}