From 557117f0931d37acca4ee1c2c49d327d9a1e26ad Mon Sep 17 00:00:00 2001 From: CPunch Date: Fri, 1 Dec 2023 19:56:23 -0600 Subject: [PATCH] moved internal/protocol -> cnet/protocol --- cnet/peer.go | 2 +- {internal => cnet}/protocol/encrypt.go | 0 {internal => cnet}/protocol/packet.go | 0 {internal => cnet}/protocol/pool.go | 0 {internal => cnet}/protocol/protocol_test.go | 2 +- {internal => cnet}/protocol/structs.go | 0 cnet/service.go | 2 +- cnet/service_test.go | 2 +- internal/db/account.go | 2 +- internal/db/db_test.go | 2 +- internal/db/inventory.go | 2 +- internal/db/players.go | 2 +- login/login.go | 2 +- login/loginserver.go | 2 +- shard/chat.go | 2 +- shard/entity/npc.go | 2 +- shard/entity/player.go | 2 +- shard/join.go | 2 +- shard/movement.go | 2 +- shard/shardserver.go | 2 +- 20 files changed, 16 insertions(+), 16 deletions(-) rename {internal => cnet}/protocol/encrypt.go (100%) rename {internal => cnet}/protocol/packet.go (100%) rename {internal => cnet}/protocol/pool.go (100%) rename {internal => cnet}/protocol/protocol_test.go (98%) rename {internal => cnet}/protocol/structs.go (100%) diff --git a/cnet/peer.go b/cnet/peer.go index 968c865..a8a2e82 100644 --- a/cnet/peer.go +++ b/cnet/peer.go @@ -9,7 +9,7 @@ import ( "net" "sync/atomic" - "github.com/CPunch/gopenfusion/internal/protocol" + "github.com/CPunch/gopenfusion/cnet/protocol" ) const ( diff --git a/internal/protocol/encrypt.go b/cnet/protocol/encrypt.go similarity index 100% rename from internal/protocol/encrypt.go rename to cnet/protocol/encrypt.go diff --git a/internal/protocol/packet.go b/cnet/protocol/packet.go similarity index 100% rename from internal/protocol/packet.go rename to cnet/protocol/packet.go diff --git a/internal/protocol/pool.go b/cnet/protocol/pool.go similarity index 100% rename from internal/protocol/pool.go rename to cnet/protocol/pool.go diff --git a/internal/protocol/protocol_test.go b/cnet/protocol/protocol_test.go similarity index 98% rename from internal/protocol/protocol_test.go rename to cnet/protocol/protocol_test.go index 92e8900..068cc2e 100644 --- a/internal/protocol/protocol_test.go +++ b/cnet/protocol/protocol_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/CPunch/gopenfusion/internal/protocol" + "github.com/CPunch/gopenfusion/cnet/protocol" "github.com/matryer/is" ) diff --git a/internal/protocol/structs.go b/cnet/protocol/structs.go similarity index 100% rename from internal/protocol/structs.go rename to cnet/protocol/structs.go diff --git a/cnet/service.go b/cnet/service.go index fad569c..b17aeb5 100644 --- a/cnet/service.go +++ b/cnet/service.go @@ -10,8 +10,8 @@ import ( "strconv" "sync" + "github.com/CPunch/gopenfusion/cnet/protocol" "github.com/CPunch/gopenfusion/config" - "github.com/CPunch/gopenfusion/internal/protocol" ) type PacketHandler func(peer *Peer, pkt protocol.Packet) error diff --git a/cnet/service_test.go b/cnet/service_test.go index 896a307..ee85705 100644 --- a/cnet/service_test.go +++ b/cnet/service_test.go @@ -11,7 +11,7 @@ import ( "time" "github.com/CPunch/gopenfusion/cnet" - "github.com/CPunch/gopenfusion/internal/protocol" + "github.com/CPunch/gopenfusion/cnet/protocol" "github.com/matryer/is" ) diff --git a/internal/db/account.go b/internal/db/account.go index 2b6b801..011c6f7 100644 --- a/internal/db/account.go +++ b/internal/db/account.go @@ -6,7 +6,7 @@ import ( "golang.org/x/crypto/bcrypt" - "github.com/CPunch/gopenfusion/internal/protocol" + "github.com/CPunch/gopenfusion/cnet/protocol" "github.com/georgysavva/scany/v2/sqlscan" ) diff --git a/internal/db/db_test.go b/internal/db/db_test.go index a85b37c..771bf46 100644 --- a/internal/db/db_test.go +++ b/internal/db/db_test.go @@ -8,8 +8,8 @@ import ( "github.com/matryer/is" + "github.com/CPunch/gopenfusion/cnet/protocol" "github.com/CPunch/gopenfusion/internal/db" - "github.com/CPunch/gopenfusion/internal/protocol" "github.com/bitcomplete/sqltestutil" ) diff --git a/internal/db/inventory.go b/internal/db/inventory.go index 4502396..e582060 100644 --- a/internal/db/inventory.go +++ b/internal/db/inventory.go @@ -3,7 +3,7 @@ package db import ( "database/sql" - "github.com/CPunch/gopenfusion/internal/protocol" + "github.com/CPunch/gopenfusion/cnet/protocol" ) type Inventory struct { diff --git a/internal/db/players.go b/internal/db/players.go index efc1547..8c0e6de 100644 --- a/internal/db/players.go +++ b/internal/db/players.go @@ -3,8 +3,8 @@ package db import ( "database/sql" + "github.com/CPunch/gopenfusion/cnet/protocol" "github.com/CPunch/gopenfusion/config" - "github.com/CPunch/gopenfusion/internal/protocol" "github.com/blockloop/scan" ) diff --git a/login/login.go b/login/login.go index 84ea1a3..67bb645 100644 --- a/login/login.go +++ b/login/login.go @@ -8,9 +8,9 @@ import ( "math/rand" "github.com/CPunch/gopenfusion/cnet" + "github.com/CPunch/gopenfusion/cnet/protocol" "github.com/CPunch/gopenfusion/config" "github.com/CPunch/gopenfusion/internal/db" - "github.com/CPunch/gopenfusion/internal/protocol" "github.com/CPunch/gopenfusion/internal/redis" "github.com/CPunch/gopenfusion/util" ) diff --git a/login/loginserver.go b/login/loginserver.go index aae6304..ce6edd2 100644 --- a/login/loginserver.go +++ b/login/loginserver.go @@ -4,8 +4,8 @@ import ( "context" "github.com/CPunch/gopenfusion/cnet" + "github.com/CPunch/gopenfusion/cnet/protocol" "github.com/CPunch/gopenfusion/internal/db" - "github.com/CPunch/gopenfusion/internal/protocol" "github.com/CPunch/gopenfusion/internal/redis" ) diff --git a/shard/chat.go b/shard/chat.go index c10eccd..29b612b 100644 --- a/shard/chat.go +++ b/shard/chat.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/CPunch/gopenfusion/cnet" - "github.com/CPunch/gopenfusion/internal/protocol" + "github.com/CPunch/gopenfusion/cnet/protocol" "github.com/CPunch/gopenfusion/shard/entity" ) diff --git a/shard/entity/npc.go b/shard/entity/npc.go index e61326f..526d3f4 100644 --- a/shard/entity/npc.go +++ b/shard/entity/npc.go @@ -4,7 +4,7 @@ import ( "sync/atomic" "github.com/CPunch/gopenfusion/cnet" - "github.com/CPunch/gopenfusion/internal/protocol" + "github.com/CPunch/gopenfusion/cnet/protocol" ) type NPC struct { diff --git a/shard/entity/player.go b/shard/entity/player.go index 0d10927..c6fb1f5 100644 --- a/shard/entity/player.go +++ b/shard/entity/player.go @@ -2,8 +2,8 @@ package entity import ( "github.com/CPunch/gopenfusion/cnet" + "github.com/CPunch/gopenfusion/cnet/protocol" "github.com/CPunch/gopenfusion/internal/db" - "github.com/CPunch/gopenfusion/internal/protocol" ) type Player struct { diff --git a/shard/join.go b/shard/join.go index c0aff6d..16a184f 100644 --- a/shard/join.go +++ b/shard/join.go @@ -5,7 +5,7 @@ import ( "log" "github.com/CPunch/gopenfusion/cnet" - "github.com/CPunch/gopenfusion/internal/protocol" + "github.com/CPunch/gopenfusion/cnet/protocol" "github.com/CPunch/gopenfusion/internal/redis" "github.com/CPunch/gopenfusion/shard/entity" "github.com/CPunch/gopenfusion/util" diff --git a/shard/movement.go b/shard/movement.go index a8317c1..dd00ff1 100644 --- a/shard/movement.go +++ b/shard/movement.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/CPunch/gopenfusion/cnet" - "github.com/CPunch/gopenfusion/internal/protocol" + "github.com/CPunch/gopenfusion/cnet/protocol" "github.com/CPunch/gopenfusion/shard/entity" "github.com/CPunch/gopenfusion/util" ) diff --git a/shard/shardserver.go b/shard/shardserver.go index aa71b59..bff7cd9 100644 --- a/shard/shardserver.go +++ b/shard/shardserver.go @@ -4,9 +4,9 @@ import ( "context" "github.com/CPunch/gopenfusion/cnet" + "github.com/CPunch/gopenfusion/cnet/protocol" "github.com/CPunch/gopenfusion/config" "github.com/CPunch/gopenfusion/internal/db" - "github.com/CPunch/gopenfusion/internal/protocol" "github.com/CPunch/gopenfusion/internal/redis" "github.com/CPunch/gopenfusion/shard/entity" )