Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
mileusna committed Sep 13, 2024
1 parent 343162a commit 13c98cc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ func parseVersion(ver string) (verno VersionNo) {
if verno.Major, err = strconv.Atoi(parts[0]); err != nil {
return verno
}
}
if len(parts) > 1 {
if verno.Minor, err = strconv.Atoi(parts[1]); err != nil {
return verno
}
if len(parts) > 2 {
if verno.Patch, err = strconv.Atoi(parts[2]); err != nil {
if len(parts) > 1 {
if verno.Minor, err = strconv.Atoi(parts[1]); err != nil {
return verno
}
if len(parts) > 2 {
if verno.Patch, err = strconv.Atoi(parts[2]); err != nil {
return verno
}
}
}
}
return verno
Expand Down

0 comments on commit 13c98cc

Please sign in to comment.