From ed07f4e3ea44cd68c3a4f4c87850549e0ae1535f Mon Sep 17 00:00:00 2001 From: Fan Yang Date: Sat, 6 Jan 2018 13:25:19 +0800 Subject: [PATCH 1/2] fix upstream API signature changes --- epub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epub.go b/epub.go index d34fcd9..1cfd419 100644 --- a/epub.go +++ b/epub.go @@ -131,7 +131,7 @@ func NewEpub(title string) *Epub { e.pkg = newPackage() e.toc = newToc() // Set minimal required attributes - e.SetIdentifier(urnUUIDPrefix + uuid.NewV4().String()) + e.SetIdentifier(urnUUIDPrefix + uuid.Must(uuid.NewV4()).String()) e.SetLang(defaultEpubLang) e.SetTitle(title) From 6abf07a1f82783498a6c551b1cb92428c95b41df Mon Sep 17 00:00:00 2001 From: Fan Yang Date: Sat, 18 Aug 2018 10:10:20 +0800 Subject: [PATCH 2/2] (*)change uuid package due to security issue --- epub.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epub.go b/epub.go index 1cfd419..4e53636 100644 --- a/epub.go +++ b/epub.go @@ -36,7 +36,7 @@ import ( "path/filepath" "strings" - "github.com/satori/go.uuid" + "github.com/google/uuid" ) // ErrFilenameAlreadyUsed is thrown by AddCSS, AddFont, AddImage, or AddSection @@ -131,7 +131,7 @@ func NewEpub(title string) *Epub { e.pkg = newPackage() e.toc = newToc() // Set minimal required attributes - e.SetIdentifier(urnUUIDPrefix + uuid.Must(uuid.NewV4()).String()) + e.SetIdentifier(urnUUIDPrefix + uuid.New().String()) e.SetLang(defaultEpubLang) e.SetTitle(title)