♻️ Modify UUID to allow for other versions.
This commit is contained in:
parent
f121b7dbce
commit
fee2e3cc2f
4 changed files with 55 additions and 24 deletions
|
|
@ -9,7 +9,7 @@ import (
|
|||
)
|
||||
|
||||
func TestUUID(t *testing.T) {
|
||||
st, err := UUID()(nil)
|
||||
st, err := UUID(nil)(nil)
|
||||
assert.NoError(t, err)
|
||||
_, parseErr := uuid.Parse(st)
|
||||
assert.NoError(t, parseErr)
|
||||
|
|
@ -25,7 +25,7 @@ func TestUUIDFail(t *testing.T) {
|
|||
uuid.SetRand(badRead{})
|
||||
defer uuid.SetRand(nil)
|
||||
|
||||
_, err := UUID()(nil)
|
||||
_, err := UUID(nil)(nil)
|
||||
assert.Equal(t, errors.New("sorry"), err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue