Skip to content

Commit

Permalink
Typed signatures for event handlers.
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Patrin <ppatrin@nvidia.com>
  • Loading branch information
pavelpatrin committed Aug 4, 2024
1 parent 00353ec commit d004a40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ import (
"sync"
)

// HandlerTypeMismatchError declares handler type mismatch error.
var HandlerTypeMismatchError = errors.New("handler type mismatch")

// Events declares event broker type.
type Events interface {
// Subscribe registers event handler.
Expand Down Expand Up @@ -165,3 +162,6 @@ func (e *event) Args() []any { return e.args }

// anySliceType contains reflection type for any slice variable.
var anySliceType = reflect.TypeOf((*[]any)(nil)).Elem()

// HandlerTypeMismatchError declares handler type mismatch error.
var HandlerTypeMismatchError = errors.New("handler type mismatch")

0 comments on commit d004a40

Please sign in to comment.