Browse code

pkg/system: make OSVersion an alias for hcsshim OSVersion

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/10/25 07:21:52
Showing 1 changed files
... ...
@@ -1,7 +1,6 @@
1 1
 package system // import "github.com/docker/docker/pkg/system"
2 2
 
3 3
 import (
4
-	"fmt"
5 4
 	"syscall"
6 5
 	"unsafe"
7 6
 
... ...
@@ -62,7 +61,7 @@ var (
62 62
 
63 63
 // OSVersion is a wrapper for Windows version information
64 64
 // https://msdn.microsoft.com/en-us/library/windows/desktop/ms724439(v=vs.85).aspx
65
-type OSVersion osversion.OSVersion
65
+type OSVersion = osversion.OSVersion
66 66
 
67 67
 // https://msdn.microsoft.com/en-us/library/windows/desktop/ms724833(v=vs.85).aspx
68 68
 type osVersionInfoEx struct {
... ...
@@ -83,11 +82,7 @@ type osVersionInfoEx struct {
83 83
 // dockerd.exe must be manifested to get the correct version information.
84 84
 // Deprecated: use github.com/Microsoft/hcsshim/osversion.Get() instead
85 85
 func GetOSVersion() OSVersion {
86
-	return OSVersion(osversion.Get())
87
-}
88
-
89
-func (osv OSVersion) ToString() string {
90
-	return fmt.Sprintf("%d.%d.%d", osv.MajorVersion, osv.MinorVersion, osv.Build)
86
+	return osversion.Get()
91 87
 }
92 88
 
93 89
 // IsWindowsClient returns true if the SKU is client