From dc394945fb27897001f16cac90bc4630c20a3eed Mon Sep 17 00:00:00 2001 From: "DESKTOP-V763RJ7\\Administrator" <835606593@qq.com> Date: Wed, 7 Jan 2026 15:15:26 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E4=BF=AE=E6=94=B9model=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.go | 4 ++-- app/base.go | 6 +++--- app/pprof.go | 2 +- app/websocket.go | 4 ++-- config/config.go | 2 +- go.mod | 4 +--- go.sum | 2 ++ internal/ws/client.go | 6 +++--- internal/ws/handler.go | 4 ++-- internal/ws/manager.go | 2 +- internal/ws/router.go | 2 +- main.go | 2 +- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/app/app.go b/app/app.go index b6df441..877ffc3 100644 --- a/app/app.go +++ b/app/app.go @@ -1,10 +1,10 @@ package app import ( - "common/log" "fmt" + "git.hlsq.asia/mmorpg/service-common/log" + "git.hlsq.asia/mmorpg/service-robot/config" "github.com/judwhite/go-svc" - "robot/config" ) type Program struct { diff --git a/app/base.go b/app/base.go index 97c9e12..eb12db9 100644 --- a/app/base.go +++ b/app/base.go @@ -1,10 +1,10 @@ package app import ( - "common/log" - "common/utils" + "git.hlsq.asia/mmorpg/service-common/log" + "git.hlsq.asia/mmorpg/service-common/utils" + "git.hlsq.asia/mmorpg/service-robot/config" "math/rand" - "robot/config" ) // ModuleBase 基础模块,或者一些零散的模块 diff --git a/app/pprof.go b/app/pprof.go index 35840fe..dc188d8 100644 --- a/app/pprof.go +++ b/app/pprof.go @@ -1,9 +1,9 @@ package app import ( - "common/log" "context" "errors" + "git.hlsq.asia/mmorpg/service-common/log" "net/http" _ "net/http/pprof" "sync" diff --git a/app/websocket.go b/app/websocket.go index eae48db..7a533a2 100644 --- a/app/websocket.go +++ b/app/websocket.go @@ -2,8 +2,8 @@ package app import ( "fmt" - "robot/config" - "robot/internal/ws" + "git.hlsq.asia/mmorpg/service-robot/config" + "git.hlsq.asia/mmorpg/service-robot/internal/ws" ) // ModuleWebsocket Websocket客户端模块 diff --git a/config/config.go b/config/config.go index 51bad6b..d014b7b 100644 --- a/config/config.go +++ b/config/config.go @@ -1,6 +1,6 @@ package config -import "common/config" +import "git.hlsq.asia/mmorpg/service-common/config" const path = "./config" diff --git a/go.mod b/go.mod index d0d5b36..8f39a9b 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module git.hlsq.asia/mmorpg/service-robot go 1.23.1 require ( - common v0.0.0-00010101000000-000000000000 + git.hlsq.asia/mmorpg/service-common v0.0.0-20260107061047-e02e56781e78 github.com/gorilla/websocket v1.5.3 github.com/judwhite/go-svc v1.2.1 google.golang.org/protobuf v1.36.9 @@ -65,5 +65,3 @@ require ( gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace common => ../common diff --git a/go.sum b/go.sum index 4daf7db..53565c0 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +git.hlsq.asia/mmorpg/service-common v0.0.0-20260107061047-e02e56781e78 h1:4CP8w5jHDOdN7hym8YrtioxNDd7PS2WcZDrO6dtY344= +git.hlsq.asia/mmorpg/service-common v0.0.0-20260107061047-e02e56781e78/go.mod h1:xv6m1I2jUA6mudKVznygpnzMoshBQarthHD1QnkW4qc= github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0= diff --git a/internal/ws/client.go b/internal/ws/client.go index 2aed3c3..ee003fb 100644 --- a/internal/ws/client.go +++ b/internal/ws/client.go @@ -2,14 +2,14 @@ package ws import ( "bytes" - "common/log" - "common/proto/sc/sc_pb" - "common/utils" "context" "crypto/tls" "encoding/json" "errors" "fmt" + "git.hlsq.asia/mmorpg/service-common/log" + "git.hlsq.asia/mmorpg/service-common/proto/sc/sc_pb" + "git.hlsq.asia/mmorpg/service-common/utils" "github.com/gorilla/websocket" "google.golang.org/protobuf/proto" "io" diff --git a/internal/ws/handler.go b/internal/ws/handler.go index 69a198d..a2bdf48 100644 --- a/internal/ws/handler.go +++ b/internal/ws/handler.go @@ -1,8 +1,8 @@ package ws import ( - "common/log" - "common/proto/sc/sc_pb" + "git.hlsq.asia/mmorpg/service-common/log" + "git.hlsq.asia/mmorpg/service-common/proto/sc/sc_pb" "google.golang.org/protobuf/proto" "math" "math/rand" diff --git a/internal/ws/manager.go b/internal/ws/manager.go index 9db5a8a..164a30d 100644 --- a/internal/ws/manager.go +++ b/internal/ws/manager.go @@ -1,7 +1,7 @@ package ws import ( - "robot/config" + "git.hlsq.asia/mmorpg/service-robot/config" "time" ) diff --git a/internal/ws/router.go b/internal/ws/router.go index 45c7ec5..8b352ec 100644 --- a/internal/ws/router.go +++ b/internal/ws/router.go @@ -1,6 +1,6 @@ package ws -import "common/proto/sc/sc_pb" +import "git.hlsq.asia/mmorpg/service-common/proto/sc/sc_pb" var router map[sc_pb.MessageID]BaseRouter diff --git a/main.go b/main.go index 8cc2bdf..284bd91 100644 --- a/main.go +++ b/main.go @@ -2,8 +2,8 @@ package main import ( "fmt" + "git.hlsq.asia/mmorpg/service-robot/app" "github.com/judwhite/go-svc" - "robot/app" "syscall" )