From 1ff7912b0f19a87c535d87ffd41bcceea6008831 Mon Sep 17 00:00:00 2001 From: celogeek <65178+celogeek@users.noreply.github.com> Date: Sat, 10 Feb 2024 00:07:21 +0200 Subject: [PATCH] handle error --- internal/epub/progress/epub_progress_json.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/epub/progress/epub_progress_json.go b/internal/epub/progress/epub_progress_json.go index eb691e5..cce3709 100644 --- a/internal/epub/progress/epub_progress_json.go +++ b/internal/epub/progress/epub_progress_json.go @@ -20,7 +20,7 @@ func newEpubProgressJson(o Options) EpubProgress { func (p *Json) Add(num int) error { p.current += num - p.e.Encode(map[string]any{ + return p.e.Encode(map[string]any{ "type": "progress", "data": map[string]any{ "progress": map[string]any{ @@ -34,7 +34,6 @@ func (p *Json) Add(num int) error { "description": p.o.Description, }, }) - return nil } func (p *Json) Close() error {