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

Merge pull request #40135 from thaJeztah/nitfix_galore

pkg/system: make OSVersion an alias for hcsshim OSVersion
This commit is contained in:
Brian Goff 2019-11-24 07:36:05 -08:00 committed by GitHub
commit 8840071c26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 8 deletions

View file

@ -9,7 +9,6 @@ import (
"time"
"github.com/Microsoft/hcsshim/osversion"
"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/pkg/parsers/kernel"
"gotest.tools/assert"

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