Skip to content

Commit

Permalink
Merge branch 'main' into add-unit-test
Browse files Browse the repository at this point in the history
  • Loading branch information
nao1215 committed Sep 16, 2022
2 parents 77f8747 + a82f2df commit e66a501
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion internal/goutil/goutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ func (p *Package) VersionCheckResultStr() string {

// IsAlreadyUpToDate return whether binary is already up to date or not.
func IsAlreadyUpToDate(ver Version) bool {
return ver.Current == ver.Latest
if ver.Current == ver.Latest {
return true
}

return strings.Compare(
strings.TrimLeft(ver.Current, "v"),
strings.TrimLeft(ver.Latest, "v"),
) >= 0
}

// NewGoPaths return GoPaths instance.
Expand Down

0 comments on commit e66a501

Please sign in to comment.