mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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 (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/docker/docker/pkg/system"
|
"github.com/Microsoft/hcsshim/osversion"
|
||||||
"golang.org/x/sys/windows/registry"
|
"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.
|
// GetOperatingSystemVersion gets the version of the current operating system, as a string.
|
||||||
func GetOperatingSystemVersion() (string, error) {
|
func GetOperatingSystemVersion() (string, error) {
|
||||||
version := system.GetOSVersion()
|
version := osversion.Get()
|
||||||
return fmt.Sprintf("%d.%d.%d", version.MajorVersion, version.MinorVersion, version.Build), nil
|
return fmt.Sprintf("%d.%d.%d", version.MajorVersion, version.MinorVersion, version.Build), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue