From cb61d90cae3fb7135a9fdab59dcc8c273f9a4c48 Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Thu, 17 Oct 2024 19:19:22 +0200 Subject: [PATCH] Make NewLogo more flexible --- id.go | 4 ++-- logo.go | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/id.go b/id.go index ca64c53..b5c6993 100644 --- a/id.go +++ b/id.go @@ -11,8 +11,8 @@ type ID struct { } // NewID creates a new ID. It returns a *ID. -func NewID(id IRI) *ID { - return &ID{URI: IRI(id)} +func NewID(uri IRI) *ID { + return &ID{URI: IRI(uri)} } // Check checks the ID for incompatibilities with RFC4287. It returns an error. diff --git a/logo.go b/logo.go index 578f436..685fb26 100644 --- a/logo.go +++ b/logo.go @@ -3,8 +3,6 @@ package atom import ( "errors" "fmt" - - "github.com/google/uuid" ) type Logo struct { @@ -13,8 +11,8 @@ type Logo struct { } // NewLogo creates a new Logo. It returns a *Logo. -func NewLogo() *Logo { - return &Logo{URI: IRI(fmt.Sprint("urn:uuid:", uuid.New()))} +func NewLogo(uri string) *Logo { + return &Logo{URI: IRI(uri)} } // Check checks the Logo for incompatibilities with RFC4287. It returns an