feature/epic0-foundation #1

Merged
master merged 20 commits from feature/epic0-foundation into main 2025-11-05 13:44:59 +01:00
2 changed files with 16 additions and 6 deletions
Showing only changes of commit 5f15ebd967 - Show all commits

View File

@@ -47,6 +47,5 @@ issues:
- revive - revive
output: output:
format: colored-line-number
print-issued-lines: true print-issued-lines: true
print-linter-name: true print-linter-name: true

View File

@@ -52,9 +52,20 @@ func ErrorLog(msg string, fields ...Field) {
// Used as a fallback when no global logger is set. // Used as a fallback when no global logger is set.
type noOpLogger struct{} type noOpLogger struct{}
func (n *noOpLogger) Debug(_ string, _ ...Field) {} // Debug implements Logger.Debug as a no-op.
func (n *noOpLogger) Info(_ string, _ ...Field) {} func (n *noOpLogger) Debug(_ string, _ ...Field) {}
func (n *noOpLogger) Warn(_ string, _ ...Field) {}
func (n *noOpLogger) Error(_ string, _ ...Field) {} // Info implements Logger.Info as a no-op.
func (n *noOpLogger) With(_ ...Field) Logger { return n } func (n *noOpLogger) Info(_ string, _ ...Field) {}
// Warn implements Logger.Warn as a no-op.
func (n *noOpLogger) Warn(_ string, _ ...Field) {}
// Error implements Logger.Error as a no-op.
func (n *noOpLogger) Error(_ string, _ ...Field) {}
// With implements Logger.With as a no-op.
func (n *noOpLogger) With(_ ...Field) Logger { return n }
// WithContext implements Logger.WithContext as a no-op.
func (n *noOpLogger) WithContext(_ context.Context) Logger { return n } func (n *noOpLogger) WithContext(_ context.Context) Logger { return n }