Files
goplt/pkg/errorbus/errorbus.go
0x1d 52d48590ae fix: resolve all linting and formatting issues
- Fix error return value checks (errcheck)
- Fix unused parameters by using underscore prefix
- Add missing package comments to all packages
- Fix context key type issue in middleware (use typed contextKey)
- Replace deprecated trace.NewNoopTracerProvider with noop.NewTracerProvider
- Fix embedded field selector in database client
- Remove trailing whitespace
- Remove revive linter (as requested) to avoid stuttering warnings for public API interfaces

All linting and formatting checks now pass.
2025-11-05 20:48:59 +01:00

22 lines
569 B
Go

// Package errorbus provides interfaces for error publishing and handling.
package errorbus
import (
"context"
)
// ErrorPublisher defines the interface for publishing errors to the error bus.
type ErrorPublisher interface {
// Publish publishes an error to the error bus.
// The error will be logged and optionally reported to external services.
Publish(ctx context.Context, err error)
}
// ErrorContext provides additional context for errors.
type ErrorContext struct {
RequestID string
UserID string
Component string
Metadata map[string]interface{}
}