Commit d038da73 authored by Alex Brainman's avatar Alex Brainman Committed by Brad Fitzpatrick

internal/testenv: introduce IsWindowsXP

For #23072

Change-Id: I089feafef2900413d46f2358b6e41ab78187eced
Reviewed-on: https://go-review.googlesource.com/83076Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent b3a10887
......@@ -18,3 +18,7 @@ func hasSymlink() (ok bool, reason string) {
return true, ""
}
func IsWindowsXP() bool {
return false
}
......@@ -46,3 +46,12 @@ func hasSymlink() (ok bool, reason string) {
return false, ""
}
func IsWindowsXP() bool {
v, err := syscall.GetVersion()
if err != nil {
panic("GetVersion failed: " + err.Error())
}
major := byte(v)
return major < 6
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment