refactor(pdfengines): embeds => attachments

This commit is contained in:
Julien Neuhart
2026-03-08 15:49:09 +01:00
parent 7af3cd1ff5
commit cf9fd7eedc
92 changed files with 5763 additions and 3082 deletions

View File

@@ -1,28 +1,29 @@
package chromium
import (
"context"
"fmt"
"io"
"go.uber.org/zap"
"log/slog"
)
// debugLogger is wrapper around a [zap.Logger] which is used for debugging
// debugLogger is wrapper around a [slog.Logger] which is used for debugging
// Chromium.
type debugLogger struct {
logger *zap.Logger
ctx context.Context
logger *slog.Logger
}
// Write logs the bytes in a debug message.
func (debug *debugLogger) Write(p []byte) (n int, err error) {
debug.logger.Debug(string(p))
debug.logger.DebugContext(debug.ctx, string(p))
return len(p), nil
}
// Printf logs a debug message.
func (debug *debugLogger) Printf(format string, v ...any) {
debug.logger.Debug(fmt.Sprintf(format, v...))
debug.logger.DebugContext(debug.ctx, fmt.Sprintf(format, v...))
}
// Interface guards.