mirror of
https://github.com/safing/portbase
synced 2025-09-02 10:40:39 +00:00
Merge Pull Request #5 fix/windowsNTVersion into develop
This commit is contained in:
parent
f16bd27773
commit
3264163f6c
1 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,7 @@ package osdetail
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/hashicorp/go-version"
|
"github.com/hashicorp/go-version"
|
||||||
|
@ -29,6 +30,8 @@ func WindowsNTVersion() (string, error) {
|
||||||
if !fetched {
|
if !fetched {
|
||||||
_, _, windowsNTVersion, err = host.PlatformInformation()
|
_, _, windowsNTVersion, err = host.PlatformInformation()
|
||||||
|
|
||||||
|
windowsNTVersion = strings.SplitN(windowsNTVersion, " ", 2)[0]
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("failed to obtain Windows-Version: %s", err)
|
return "", fmt.Errorf("failed to obtain Windows-Version: %s", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue