From e7cf45c6fe9008a2d136ff3d8a992bd6491c8071 Mon Sep 17 00:00:00 2001 From: Maxim Bublis Date: Wed, 4 Dec 2013 23:12:06 +0400 Subject: [PATCH] Using FromString for predefined namespaces --- uuid.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uuid.go b/uuid.go index ac2db09..1ad011e 100644 --- a/uuid.go +++ b/uuid.go @@ -105,10 +105,10 @@ type UUID [16]byte // Predefined namespace UUIDs. var ( - NamespaceDNS = UUID{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8} - NamespaceURL = UUID{0x6b, 0xa7, 0xb8, 0x11, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8} - NamespaceOID = UUID{0x6b, 0xa7, 0xb8, 0x12, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8} - NamespaceX500 = UUID{0x6b, 0xa7, 0xb8, 0x14, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8} + NamespaceDNS, _ = FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8") + NamespaceURL, _ = FromString("6ba7b811-9dad-11d1-80b4-00c04fd430c8") + NamespaceOID, _ = FromString("6ba7b812-9dad-11d1-80b4-00c04fd430c8") + NamespaceX500, _ = FromString("6ba7b814-9dad-11d1-80b4-00c04fd430c8") ) // And returns result of binary AND of two UUIDs.