Skip to content

Commit

Permalink
Update util/version/version.go
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan Büringer <[email protected]>
  • Loading branch information
SubhasmitaSw and sbueringer authored Mar 7, 2022
1 parent 694781e commit 81db278
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions util/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,10 @@ func WithoutPreReleases() CompareOption {
// Example: using the WithBuildTags() option modifies the compare logic to also
// consider build tags when comparing versions.
func Compare(a, b semver.Version, options ...CompareOption) int {
a.Pre = nil
b.Pre = nil
if c. withoutPreReleases {
a.Pre = nil
b.Pre = nil
}

c := &comparer{}
for _, o := range options {
Expand Down

0 comments on commit 81db278

Please sign in to comment.