Skip to content

Commit

Permalink
Merge pull request #34 from gofrs/fix_equals_func
Browse files Browse the repository at this point in the history
Improve Equal package function

Signed-off-by: Tim Heckman <[email protected]>
  • Loading branch information
theckman committed Jul 19, 2018
2 parents 09c29bc + 2af6bef commit 65feb42
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
package uuid

import (
"bytes"
"encoding/hex"
)

Expand Down Expand Up @@ -83,9 +82,9 @@ var (
NamespaceX500 = Must(FromString("6ba7b814-9dad-11d1-80b4-00c04fd430c8"))
)

// Equal returns true if u1 and u2 equals, otherwise returns false.
func Equal(u1 UUID, u2 UUID) bool {
return bytes.Equal(u1[:], u2[:])
// Equal returns true if a and b are equivalent.
func Equal(a UUID, b UUID) bool {
return a == b
}

// Version returns the algorithm version used to generate the UUID.
Expand Down

0 comments on commit 65feb42

Please sign in to comment.