From 5bb121911e9b60704154bbc89e238b97439e2bcf Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 20 Apr 2026 09:38:01 +0300 Subject: z4: fix verification lint cleanup --- internal/comic/runner.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'internal/comic/runner.go') diff --git a/internal/comic/runner.go b/internal/comic/runner.go index 7e4e9bb..5843aab 100644 --- a/internal/comic/runner.go +++ b/internal/comic/runner.go @@ -206,10 +206,10 @@ func (r *Runner) saveVocabularyFile(storyText string, entries []vocab.WordEntry, word = strings.TrimSpace(entry.Translation) } if entry.Translation != "" && entry.Word != "" { - sb.WriteString(fmt.Sprintf(" %s - %s\n", entry.Word, entry.Translation)) + fmt.Fprintf(&sb, " %s - %s\n", entry.Word, entry.Translation) continue } - sb.WriteString(fmt.Sprintf(" %s\n", word)) + fmt.Fprintf(&sb, " %s\n", word) } sb.WriteString("\n# Story Text\n\n") sb.WriteString(strings.TrimSpace(storyText)) @@ -269,12 +269,16 @@ func copyFile(src, dst string) error { if err != nil { return err } - defer in.Close() + defer func() { + _ = in.Close() + }() out, err := os.Create(dst) if err != nil { return err } - defer out.Close() + defer func() { + _ = out.Close() + }() _, err = io.Copy(out, in) return err } -- cgit v1.2.3