Skip to content

Commit 6e10cd1

Browse files
kotaroyamazakinoahdietzbormanp
authored
fix: use MustParse("xxx") instead of Must(Parse("xxxx")) (#106)
* fix to use MustParse * use MustParse(...) inseted of Must(Parse(...)) --------- Co-authored-by: Noah Dietz <[email protected]> Co-authored-by: bormanp <[email protected]>
1 parent b5b9aeb commit 6e10cd1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

hash.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import (
1212

1313
// Well known namespace IDs and UUIDs
1414
var (
15-
NameSpaceDNS = Must(Parse("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
16-
NameSpaceURL = Must(Parse("6ba7b811-9dad-11d1-80b4-00c04fd430c8"))
17-
NameSpaceOID = Must(Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8"))
18-
NameSpaceX500 = Must(Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8"))
15+
NameSpaceDNS = MustParse("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
16+
NameSpaceURL = MustParse("6ba7b811-9dad-11d1-80b4-00c04fd430c8")
17+
NameSpaceOID = MustParse("6ba7b812-9dad-11d1-80b4-00c04fd430c8")
18+
NameSpaceX500 = MustParse("6ba7b814-9dad-11d1-80b4-00c04fd430c8")
1919
Nil UUID // empty UUID, all zeros
2020

2121
// The Max UUID is special form of UUID that is specified to have all 128 bits set to 1.

json_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"testing"
1111
)
1212

13-
var testUUID = Must(Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479"))
13+
var testUUID = MustParse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
1414

1515
func TestJSON(t *testing.T) {
1616
type S struct {

sql_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func TestScan(t *testing.T) {
1515
invalidTest := "f47ac10b-58cc-0372-8567-0e02b2c3d4"
1616

1717
byteTest := make([]byte, 16)
18-
byteTestUUID := Must(Parse(stringTest))
18+
byteTestUUID := MustParse(stringTest)
1919
copy(byteTest, byteTestUUID[:])
2020

2121
// sunny day tests
@@ -105,7 +105,7 @@ func TestScan(t *testing.T) {
105105

106106
func TestValue(t *testing.T) {
107107
stringTest := "f47ac10b-58cc-0372-8567-0e02b2c3d479"
108-
uuid := Must(Parse(stringTest))
108+
uuid := MustParse(stringTest)
109109
val, _ := uuid.Value()
110110
if val != stringTest {
111111
t.Error("Value() did not return expected string")

0 commit comments

Comments
 (0)