From f22c9df605b4b0d95384e878d2f8e7cd1e2a6c9c Mon Sep 17 00:00:00 2001 From: ayflying Date: Tue, 20 May 2025 10:43:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=A6=BBwebsocket=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/websocket/go.mod | 5 +++++ modules/websocket/go.sum | 2 ++ {pkg => modules}/websocket/registerer.go | 0 {pkg => modules}/websocket/socket_new.go | 0 pkg/pkg.go | 8 ++++---- 5 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 modules/websocket/go.mod create mode 100644 modules/websocket/go.sum rename {pkg => modules}/websocket/registerer.go (100%) rename {pkg => modules}/websocket/socket_new.go (100%) diff --git a/modules/websocket/go.mod b/modules/websocket/go.mod new file mode 100644 index 0000000..f302866 --- /dev/null +++ b/modules/websocket/go.mod @@ -0,0 +1,5 @@ +module github.com/ayflying/utility_go/modules/websocket + +go 1.24.0 + +require github.com/ayflying/utility_go v1.2.26 diff --git a/modules/websocket/go.sum b/modules/websocket/go.sum new file mode 100644 index 0000000..7e79f27 --- /dev/null +++ b/modules/websocket/go.sum @@ -0,0 +1,2 @@ +github.com/ayflying/utility_go v1.2.26/go.mod h1:y6qwRUmYk73cH/dTRSzj2mnaQdtrAfFNH4wRFewxlIc= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= diff --git a/pkg/websocket/registerer.go b/modules/websocket/registerer.go similarity index 100% rename from pkg/websocket/registerer.go rename to modules/websocket/registerer.go diff --git a/pkg/websocket/socket_new.go b/modules/websocket/socket_new.go similarity index 100% rename from pkg/websocket/socket_new.go rename to modules/websocket/socket_new.go diff --git a/pkg/pkg.go b/pkg/pkg.go index 472e3e4..b522399 100644 --- a/pkg/pkg.go +++ b/pkg/pkg.go @@ -8,7 +8,7 @@ import ( "github.com/ayflying/utility_go/pkg/notice" "github.com/ayflying/utility_go/pkg/rank" "github.com/ayflying/utility_go/pkg/s3" - "github.com/ayflying/utility_go/pkg/websocket" + //"github.com/ayflying/utility_go/pkg/websocket" "github.com/gogf/gf/v2/os/gcache" ) @@ -32,9 +32,9 @@ func Rank() *rank.Mod { return rank.New() } -func Websocket() *websocket.SocketV1 { - return websocket.NewV1() -} +//func Websocket() *websocket.SocketV1 { +// return websocket.NewV1() +//} func Config() *config.Cfg { return config.NewV1()