dukex / mixpanel

Golang Mixpanel Client
MIT License
61 stars 33 forks source link

use thread safe map in the mock #14

Closed RiiD closed 2 years ago

RiiD commented 2 years ago

There are cases when event tracking and user properties setting happen at the same time from different threads. But, since the map used in the mock is not thread safe, tests that use it fail unexpectedly. Using the sync.Map should solve the problem.

dukex commented 2 years ago

Thanks @RiiD