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 {