Merge Pull Request #5 fix/windowsNTVersion into develop

This commit is contained in:
Raskaro 2019-08-21 09:47:13 +02:00 committed by GitHub
parent f16bd27773
commit 3264163f6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,7 @@ package osdetail
import (
"fmt"
"regexp"
"strings"
"sync"
"github.com/hashicorp/go-version"
@ -29,6 +30,8 @@ func WindowsNTVersion() (string, error) {
if !fetched {
_, _, windowsNTVersion, err = host.PlatformInformation()
windowsNTVersion = strings.SplitN(windowsNTVersion, " ", 2)[0]
if err != nil {
return "", fmt.Errorf("failed to obtain Windows-Version: %s", err)
}