Commit fafd81e1 authored by deadprogram's avatar deadprogram
Browse files

Corrections to function for getting OS X version


Signed-off-by: default avatardeadprogram <ron@hybridgroup.com>
parent 99ada741
......@@ -16,13 +16,15 @@ const (
var darwinOSVersion int
func getDarwinReleaseVersion() int {
version, err := exec.Command("uname", "-r").Output()
v, err := exec.Command("uname", "-r").Output()
if err != nil {
fmt.Println(err)
return 0
}
v, _ := strconv.Atoi(strings.Split(version, ".")[0])
return v
var version string
version = v
result, _ := strconv.Atoi(strings.Split(version, ".")[0])
return result
}
// xpc command IDs are OS X version specific, so we will use a map
......
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