cluade code review changes

This commit is contained in:
2026-02-20 16:38:24 +05:30
parent a048cb0d73
commit f1601020b1
16 changed files with 150 additions and 70 deletions

View File

@@ -1,6 +1,7 @@
package email
import (
"fmt"
"os"
"path/filepath"
@@ -19,7 +20,10 @@ func (DumpToTemp) Send(msg *Message) error {
}
dir := os.TempDir()
id, _ := uuid.NewV7()
id, err := uuid.NewV7()
if err != nil {
return fmt.Errorf("email: failed to generate UUID: %w", err)
}
file := filepath.Join(dir, id.String()+".html")
if err := os.WriteFile(file, []byte(msg.HtmlBody), 0440); err != nil {