summaryrefslogtreecommitdiff
path: root/internal/comic/runner.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-20 09:38:01 +0300
committerPaul Buetow <paul@buetow.org>2026-04-20 09:38:01 +0300
commit5bb121911e9b60704154bbc89e238b97439e2bcf (patch)
treef56da042d8e346cabbcd271d625518ebd267a4ad /internal/comic/runner.go
parente670494adfe00a1fa55c7e8ffcbf0172ff662cce (diff)
z4: fix verification lint cleanup
Diffstat (limited to 'internal/comic/runner.go')
-rw-r--r--internal/comic/runner.go12
1 files changed, 8 insertions, 4 deletions
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
}