Skip to content

Commit

Permalink
Deprecate the Equal package function
Browse files Browse the repository at this point in the history
This deprecates the `Equal` package function, in favor of consumers using the
`==` comparison operator themselves between two `UUID` values. Because the UUID
value is an array type, there is no reason for the helper function.

The intent is to remove this as part of a v2.x => v3.x release.

Fixes #35

Signed-off-by: Tim Heckman <t@heckman.io>
  • Loading branch information
theckman committed Jul 19, 2018
1 parent 65feb42 commit 2f1431f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ var (
)

// Equal returns true if a and b are equivalent.
//
// Deprecated: this function is deprecated and will be removed in a future major
// version. The UUID type itself is directly comparable to another UUID value
// using `==`, meaning this function superfluous.
func Equal(a UUID, b UUID) bool {
return a == b
}
Expand Down

0 comments on commit 2f1431f

Please sign in to comment.