8 // OSVersion is a wrapper for Windows version information
9 // https://msdn.microsoft.com/en-us/library/windows/desktop/ms724439(v=vs.85).aspx
10 type OSVersion struct {
17 // GetOSVersion gets the operating system version on Windows. Note that
18 // docker.exe must be manifested to get the correct version information.
19 func GetOSVersion() (OSVersion, error) {
22 osv.Version, err = syscall.GetVersion()
24 return osv, fmt.Errorf("Failed to call GetVersion()")
26 osv.MajorVersion = uint8(osv.Version & 0xFF)
27 osv.MinorVersion = uint8(osv.Version >> 8 & 0xFF)
28 osv.Build = uint16(osv.Version >> 16)
32 // Unmount is a platform-specific helper function to call
33 // the unmount syscall. Not supported on Windows
34 func Unmount(dest string) error {