Skip to content

Commit 3bfbaad

Browse files
author
Jay Conrod
committed
semver: deprecate semver.Max
There are a number of calls to semver.Max in the wild, so let's not delete it yet. For golang/go#32700 Change-Id: I515b05f174195d1b82a931b92e21b83c370ef7c7 Reviewed-on: https://go-review.googlesource.com/c/mod/+/269357 Trust: Jay Conrod <[email protected]> Run-TryBot: Jay Conrod <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]>
1 parent ce943fd commit 3bfbaad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

semver/semver.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ func Compare(v, w string) int {
138138

139139
// Max canonicalizes its arguments and then returns the version string
140140
// that compares greater.
141+
//
142+
// Deprecated: use Compare instead. In most cases, returning a canonicalized
143+
// version is not expected or desired.
141144
func Max(v, w string) string {
142145
v = Canonical(v)
143146
w = Canonical(w)

0 commit comments

Comments
 (0)