From 13e7a1617823084b91f76a8fcc57df4a87aca96a Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Thu, 17 Oct 2024 16:51:40 +0200 Subject: [PATCH] Let the user define their own iri --- id.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/id.go b/id.go index c510579..090e74b 100644 --- a/id.go +++ b/id.go @@ -3,8 +3,6 @@ package atom import ( "errors" "fmt" - - "github.com/google/uuid" ) type ID struct { @@ -13,8 +11,8 @@ type ID struct { } // NewID creates a new ID. It returns a *ID. -func NewID() *ID { - return &ID{URI: IRI(fmt.Sprint("urn:uuid:", uuid.New()))} +func NewID(id string) *ID { + return &ID{URI: IRI(id)} } // Check checks the ID for incompatibilities with RFC4287. It returns an error.