mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Enable more go-ruleguard rules (#29781)
* Chore: Enable more go-ruleguard rules Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -112,16 +112,14 @@ func (b *InProcBus) DispatchCtx(ctx context.Context, msg Msg) error {
|
||||
func (b *InProcBus) Dispatch(msg Msg) error {
|
||||
var msgName = reflect.TypeOf(msg).Elem().Name()
|
||||
|
||||
var handler = b.handlersWithCtx[msgName]
|
||||
withCtx := true
|
||||
|
||||
handler := b.handlersWithCtx[msgName]
|
||||
if handler == nil {
|
||||
withCtx = false
|
||||
handler = b.handlers[msgName]
|
||||
}
|
||||
|
||||
if handler == nil {
|
||||
return ErrHandlerNotFound
|
||||
if handler == nil {
|
||||
return ErrHandlerNotFound
|
||||
}
|
||||
}
|
||||
|
||||
var params = []reflect.Value{}
|
||||
|
||||
Reference in New Issue
Block a user