Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
hallgren committed Jun 1, 2020
1 parent fc76082 commit 6ec6601
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions eventstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ func (e *EventStream) SubscribeAll(f func(e Event)) {
func (e *EventStream) SubscribeSpecificAggregate(f func(e Event), aggregates ...aggregate) {
for _, a := range aggregates {
aggregateType := reflect.TypeOf(a).Elem().Name()
id := a.id()
ref := fmt.Sprintf("%s_%s", aggregateType, id)
ref := fmt.Sprintf("%s_%s", aggregateType, a.id())
if e.aggregateTypes[ref] == nil {
// add the name and id of the aggregate and function to call to the empty register key
e.aggregateTypes[ref] = []func(e Event){f}
Expand Down

0 comments on commit 6ec6601

Please sign in to comment.