pkg/parsers: remove use of deprecated system.GetOSVersion()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
33d8492ce4
commit
81f9edc7b0
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue