1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/image/compat_windows.go

28 lines
469 B
Go
Raw Normal View History

package image
import (
"fmt"
"github.com/docker/docker/pkg/system"
)
// Windows OS features
const (
FeatureWin32k = "win32k" // The kernel windowing stack is required
)
func getOSVersion() string {
v := system.GetOSVersion()
return fmt.Sprintf("%d.%d.%d", v.MajorVersion, v.MinorVersion, v.Build)
}
func hasOSFeature(f string) bool {
switch f {
case FeatureWin32k:
return system.HasWin32KSupport()
default:
// Unrecognized feature.
return false
}
}