From ef902fdc28a45072f48525fbf38659d45371603b Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 13 Apr 2021 13:08:48 +0200 Subject: [PATCH] Panic on unknown user event type This should never happen. Complain loudly if it does. --- user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user.go b/user.go index ba20b7b..da70475 100644 --- a/user.go +++ b/user.go @@ -583,7 +583,7 @@ func (u *user) run() { } return default: - u.logger.Printf("received unknown event type: %T", e) + panic(fmt.Sprintf("received unknown event type: %T", e)) } } }