added linter skip comments and removed the Presentator specific inflector.Usernamify

This commit is contained in:
Gani Georgiev
2022-07-11 16:16:01 +03:00
parent ed741662b2
commit 52c288d9db
4 changed files with 4 additions and 58 deletions
+3 -2
View File
@@ -44,8 +44,9 @@ func (h *Hook[T]) Reset() {
// - any non-nil error is returned in one of the handlers
func (h *Hook[T]) Trigger(data T, oneOffHandlers ...Handler[T]) error {
h.mux.Lock()
handlers := append(h.handlers, oneOffHandlers...)
h.mux.Unlock() // unlock is not deferred to avoid deadlocks when Trigger is called recursive in the handlers
handlers := append(h.handlers, oneOffHandlers...) //nolint:gocritic
// unlock is not deferred to avoid deadlocks when Trigger is called recursive by the handlers
h.mux.Unlock()
for _, fn := range handlers {
err := fn(data)