package osversion
import "github.com/Microsoft/hcsshim/osversion"
Index ¶
- Constants
- func Build() uint16
- func CheckHostAndContainerCompat(host, ctr OSVersion) bool
- type OSVersion
Constants ¶
const ( // RS1 (version 1607, codename "Redstone 1") corresponds to Windows Server // 2016 (ltsc2016) and Windows 10 (Anniversary Update). RS1 = 14393 // RS2 (version 1703, codename "Redstone 2") was a client-only update, and // corresponds to Windows 10 (Creators Update). RS2 = 15063 // RS3 (version 1709, codename "Redstone 3") corresponds to Windows Server // 1709 (Semi-Annual Channel (SAC)), and Windows 10 (Fall Creators Update). RS3 = 16299 // RS4 (version 1803, codename "Redstone 4") corresponds to Windows Server // 1803 (Semi-Annual Channel (SAC)), and Windows 10 (April 2018 Update). RS4 = 17134 // RS5 (version 1809, codename "Redstone 5") corresponds to Windows Server // 2019 (ltsc2019), and Windows 10 (October 2018 Update). RS5 = 17763 // V19H1 (version 1903) corresponds to Windows Server 1903 (semi-annual // channel). V19H1 = 18362 // V19H2 (version 1909) corresponds to Windows Server 1909 (semi-annual // channel). V19H2 = 18363 // V20H1 (version 2004) corresponds to Windows Server 2004 (semi-annual // channel). V20H1 = 19041 // V20H2 corresponds to Windows Server 20H2 (semi-annual channel). V20H2 = 19042 // V21H1 corresponds to Windows Server 21H1 (semi-annual channel). V21H1 = 19043 // V21H2Win10 corresponds to Windows 10 (November 2021 Update). V21H2Win10 = 19044 // V21H2Server corresponds to Windows Server 2022 (ltsc2022). V21H2Server = 20348 // LTSC2022 (Windows Server 2022) is an alias for [V21H2Server] LTSC2022 = V21H2Server // V21H2Win11 corresponds to Windows 11 (original release). V21H2Win11 = 22000 // V22H2Win10 corresponds to Windows 10 (2022 Update). V22H2Win10 = 19045 // V22H2Win11 corresponds to Windows 11 (2022 Update). V22H2Win11 = 22621 )
Functions ¶
func Build ¶
func Build() uint16
Build gets the build-number on Windows The calling application must be manifested to get the correct version information.
func CheckHostAndContainerCompat ¶
CheckHostAndContainerCompat checks if given host and container OS versions are compatible. It includes support for stable ABI compliant versions as well. Every release after WS 2022 will support the previous ltsc container image. Stable ABI is in preview mode for windows 11 client. Refer: https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility?tabs=windows-server-2022%2Cwindows-10#windows-server-host-os-compatibility
Types ¶
type OSVersion ¶
OSVersion is a wrapper for Windows version information https://msdn.microsoft.com/en-us/library/windows/desktop/ms724439(v=vs.85).aspx
func Get ¶
func Get() OSVersion
Get gets the operating system version on Windows. The calling application must be manifested to get the correct version information.
func (OSVersion) ToString ¶
Source Files ¶
osversion_windows.go platform_compat_windows.go windowsbuilds.go
- Version
- v0.9.12
- Published
- Jun 27, 2024
- Platform
- windows/amd64
- Imports
- 3 packages
- Last checked
- 9 minutes ago –
Tools for package owners.