Skip to content

Commit

Permalink
fix(helpers): lint err regarding return statement (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
geyslan committed Aug 24, 2023
1 parent 6dd0e2b commit 7f95825
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions helpers/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,11 @@ func CompareKernelRelease(base, given string) (KernelVersionComparison, error) {
return KernelVersionInvalid, fmt.Errorf("invalid base kernel version value: %s issue with: %s", base, b[n])
}

if givenValue > baseValue {
switch {
case givenValue > baseValue:
return KernelVersionNewer, nil
} else if givenValue < baseValue {
case givenValue < baseValue:
return KernelVersionOlder, nil
} else {
continue
}
}
return KernelVersionEqual, nil
Expand Down

0 comments on commit 7f95825

Please sign in to comment.