summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-02-27 17:32:21 +0000
committerNick White <git@njw.name>2020-02-27 17:32:21 +0000
commit1281c63cec52c79fb5b7c960c71f5f4dbbd5a30d (patch)
treeee4ed55851412a69b30e718081778b88ec033281
parent6cce1b77f9ea5dec26099398b19d4edd39a88d4e (diff)
Fix Sprintf usage
-rw-r--r--pdf.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pdf.go b/pdf.go
index 4fb8c36..a979807 100644
--- a/pdf.go
+++ b/pdf.go
@@ -46,12 +46,12 @@ func (p *Fpdf) Setup() error {
r, err := zlib.NewReader(c)
defer r.Close()
if err != nil {
- return errors.New(fmt.Sprintf("Could not open compressed font", err))
+ return errors.New(fmt.Sprintf("Could not open compressed font: %v", err))
}
var b bytes.Buffer
_, err = b.ReadFrom(r)
if err != nil {
- return errors.New(fmt.Sprintf("Could not read compressed font", err))
+ return errors.New(fmt.Sprintf("Could not read compressed font: %v", err))
}
p.fpdf.AddUTF8FontFromBytes("dejavu", "", b.Bytes())