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.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Package errorbus provides a channel-based error bus implementation.
|
||||
package errorbus
|
||||
|
||||
import (
|
||||
@@ -11,17 +12,17 @@ import (
|
||||
|
||||
// ChannelBus implements a channel-based error bus.
|
||||
type ChannelBus struct {
|
||||
errors chan errorWithContext
|
||||
logger logger.Logger
|
||||
done chan struct{}
|
||||
wg sync.WaitGroup
|
||||
once sync.Once
|
||||
errors chan errorWithContext
|
||||
logger logger.Logger
|
||||
done chan struct{}
|
||||
wg sync.WaitGroup
|
||||
once sync.Once
|
||||
}
|
||||
|
||||
type errorWithContext struct {
|
||||
err error
|
||||
ctx context.Context
|
||||
stack []byte
|
||||
err error
|
||||
ctx context.Context
|
||||
stack []byte
|
||||
}
|
||||
|
||||
// NewChannelBus creates a new channel-based error bus.
|
||||
@@ -162,4 +163,3 @@ func (b *ChannelBus) Close() error {
|
||||
|
||||
// Ensure ChannelBus implements ErrorPublisher
|
||||
var _ errorbus.ErrorPublisher = (*ChannelBus)(nil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user