Rename Parameter

This commit is contained in:
Raskaro 2019-08-12 12:16:39 +02:00
parent 3845072094
commit dd6292b797

View file

@ -46,18 +46,18 @@ func WindowsNTVersion() (string, error) {
}
// IsAtLeastWindowsNTVersion returns whether the current WindowsNT version is at least the given version or newer.
func IsAtLeastWindowsNTVersion(otherVersion string) (bool, error) {
func IsAtLeastWindowsNTVersion(version string) (bool, error) {
_, err := WindowsNTVersion()
if err != nil {
return false, err
}
otherVersionForCmp, err := version.NewVersion(otherVersion)
versionForCmp, err := versionCmp.NewVersion(version)
if err != nil {
return false, err
}
return windowsNTVersionForCmp.GreaterThanOrEqual(otherVersionForCmp), nil
return windowsNTVersionForCmp.GreaterThanOrEqual(versionForCmp), nil
}
// IsAtLeastWindowsNTVersionWithDefault is like IsAtLeastWindowsNTVersion(), but keeps the Error and returns the default Value in Errorcase