Skip to content

Commit

Permalink
Merge pull request moby#40135 from thaJeztah/nitfix_galore
Browse files Browse the repository at this point in the history
pkg/system: make OSVersion an alias for hcsshim OSVersion
  • Loading branch information
cpuguy83 authored Nov 24, 2019
2 parents d1d5f64 + 9d12bc2 commit 8840071
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion integration-cli/docker_cli_start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 2 additions & 7 deletions pkg/system/syscall_windows.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package system // import "github.com/docker/docker/pkg/system"

import (
"fmt"
"syscall"
"unsafe"

Expand Down Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit 8840071

Please sign in to comment.