From 2b0186e499363c82bee268ad2143361c9d1759f1 Mon Sep 17 00:00:00 2001 From: 0ceanSlim Date: Tue, 23 Jul 2024 13:22:55 -0400 Subject: [PATCH] events package renamed to kinds --- server/{events => kinds}/kind0.go | 2 +- server/{events => kinds}/kind1.go | 2 +- server/{events => kinds}/unhandled.go | 2 +- server/server.go | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) rename server/{events => kinds}/kind0.go (98%) rename server/{events => kinds}/kind1.go (96%) rename server/{events => kinds}/unhandled.go (96%) diff --git a/server/events/kind0.go b/server/kinds/kind0.go similarity index 98% rename from server/events/kind0.go rename to server/kinds/kind0.go index ac0fb18..bae43e3 100644 --- a/server/events/kind0.go +++ b/server/kinds/kind0.go @@ -1,4 +1,4 @@ -package events +package kinds import ( "context" diff --git a/server/events/kind1.go b/server/kinds/kind1.go similarity index 96% rename from server/events/kind1.go rename to server/kinds/kind1.go index 952c0ab..2b0de4c 100644 --- a/server/events/kind1.go +++ b/server/kinds/kind1.go @@ -1,4 +1,4 @@ -package events +package kinds import ( "context" diff --git a/server/events/unhandled.go b/server/kinds/unhandled.go similarity index 96% rename from server/events/unhandled.go rename to server/kinds/unhandled.go index 62069b1..3606b5e 100644 --- a/server/events/unhandled.go +++ b/server/kinds/unhandled.go @@ -1,4 +1,4 @@ -package events +package kinds import ( "context" diff --git a/server/server.go b/server/server.go index 52f7364..2854453 100644 --- a/server/server.go +++ b/server/server.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" "grain/server/db" - "grain/server/events" + "grain/server/kinds" server "grain/server/types" "grain/server/utils" @@ -98,11 +98,11 @@ func HandleKind(ctx context.Context, evt server.Event, ws *websocket.Conn) { var err error switch evt.Kind { case 0: - err = events.HandleKind0(ctx, evt, collection) + err = kinds.HandleKind0(ctx, evt, collection) case 1: - err = events.HandleKind1(ctx, evt, collection) + err = kinds.HandleKind1(ctx, evt, collection) default: - err = events.HandleUnknownKind(ctx, evt, collection) + err = kinds.HandleUnknownKind(ctx, evt, collection) } if err != nil {