pkg/parsers: remove use of deprecated system.GetOSVersion()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-11-25 13:39:25 +01:00
parent 33d8492ce4
commit 81f9edc7b0
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -3,7 +3,7 @@ package operatingsystem // import "github.com/docker/docker/pkg/parsers/operatin
import (
"fmt"
"github.com/docker/docker/pkg/system"
"github.com/Microsoft/hcsshim/osversion"
"golang.org/x/sys/windows/registry"
)
@ -52,7 +52,7 @@ func withCurrentVersionRegistryKey(f func(registry.Key) (string, error)) (string
// GetOperatingSystemVersion gets the version of the current operating system, as a string.
func GetOperatingSystemVersion() (string, error) {
version := system.GetOSVersion()
version := osversion.Get()
return fmt.Sprintf("%d.%d.%d", version.MajorVersion, version.MinorVersion, version.Build), nil
}