1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

pkg/system: make OSVersion an alias for hcsshim OSVersion

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-10-25 00:21:52 +02:00
parent 0945a8807d
commit 9d12bc2573
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -1,7 +1,6 @@
package system // import "github.com/docker/docker/pkg/system"
import (
"fmt"
"syscall"
"unsafe"
@ -62,7 +61,7 @@ var (
// OSVersion is a wrapper for Windows version information
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724439(v=vs.85).aspx
type OSVersion osversion.OSVersion
type OSVersion = osversion.OSVersion
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724833(v=vs.85).aspx
type osVersionInfoEx struct {
@ -83,11 +82,7 @@ type osVersionInfoEx struct {
// dockerd.exe must be manifested to get the correct version information.
// Deprecated: use github.com/Microsoft/hcsshim/osversion.Get() instead
func GetOSVersion() OSVersion {
return OSVersion(osversion.Get())
}
func (osv OSVersion) ToString() string {
return fmt.Sprintf("%d.%d.%d", osv.MajorVersion, osv.MinorVersion, osv.Build)
return osversion.Get()
}
// IsWindowsClient returns true if the SKU is client