diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-08 08:41:59 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-08 08:41:59 +0200 |
| commit | aa733f9a86b02d7b4d6edd8022a44e4ba417b24c (patch) | |
| tree | efdea87ad377557bb222e948894b5db5832ce6e9 /internal/gui/generator.go | |
| parent | 3a255c0c64f858d5c05797aba9a6d159b0c7d82f (diff) | |
test(task-374): fix errcheck issues in tests and support code
Diffstat (limited to 'internal/gui/generator.go')
| -rw-r--r-- | internal/gui/generator.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/gui/generator.go b/internal/gui/generator.go index 9c20e92..14f0f60 100644 --- a/internal/gui/generator.go +++ b/internal/gui/generator.go @@ -327,7 +327,9 @@ func (a *Application) generateImagesWithPrompt(ctx context.Context, word string, openaiClient.SetPromptCallback(func(prompt string) { // Save the prompt to disk immediately for this word promptFile := filepath.Join(cardDir, "image_prompt.txt") - os.WriteFile(promptFile, []byte(prompt), 0644) + if err := os.WriteFile(promptFile, []byte(prompt), 0644); err != nil { + fmt.Printf("Warning: Failed to save prompt for '%s': %v\n", word, err) + } // Only update UI if this word is still the current word a.mu.Lock() |
