mirror of
https://github.com/coreybutler/nvm-windows.git
synced 2025-09-04 03:35:53 +00:00
Merge pull request #806 from SayefReyadh/refactor/typo_fix_and_refactor
Refactor/minor typo fixed in comments
This commit is contained in:
@@ -16,7 +16,7 @@ func SearchBytesInFile( path string, match string, limit int) bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Opening the file and checking if there is an arror
|
||||
// Opening the file and checking if there is an error
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
return false;
|
||||
|
@@ -32,7 +32,7 @@ type Version struct {
|
||||
Minor uint64
|
||||
Patch uint64
|
||||
Pre []*PRVersion
|
||||
Build []string //No Precendence
|
||||
Build []string //No Precedence
|
||||
}
|
||||
|
||||
// Version to string
|
||||
@@ -126,7 +126,7 @@ func (v *Version) Compare(o *Version) int {
|
||||
}
|
||||
}
|
||||
|
||||
// If all pr versions are the equal but one has further prversion, this one greater
|
||||
// If all pr versions are the equal but one has further pr version, this one greater
|
||||
if i == len(v.Pre) && i == len(o.Pre) {
|
||||
return 0
|
||||
} else if i == len(v.Pre) && i < len(o.Pre) {
|
||||
@@ -222,7 +222,7 @@ func Parse(s string) (*Version, error) {
|
||||
} else if preIndex == -1 && buildIndex == -1 {
|
||||
subVersionIndex = len(parts[2])
|
||||
} else {
|
||||
// if there is no actual prversion but a hyphen inside the build meta data
|
||||
// if there is no actual pr version but a hyphen inside the build meta data
|
||||
if buildIndex < preIndex {
|
||||
subVersionIndex = buildIndex
|
||||
preIndex = -1 // Build meta data before preIndex found implicates there are no prerelease versions
|
||||
|
Reference in New Issue
Block a user