From 50cfc9bd7afe42dea07e9fc71465ab53cdf8cc95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=A1=D0=B0?= =?UTF-8?q?=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Thu, 25 Sep 2025 16:37:50 +0300 Subject: [PATCH] fix any errors --- go.mod | 3 +++ go.sum | 2 -- web/service/inbound.go | 3 ++- web/service/inbound_service_sync_test.go | 5 +++-- web/service/multi_server_service.go | 4 ++-- web/service/multi_server_service_test.go | 5 +++-- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 55b4874d..04ef7f84 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/shirou/gopsutil/v4 v4.25.8 github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e + github.com/stretchr/testify v1.11.1 github.com/valyala/fasthttp v1.66.0 github.com/xlzd/gotp v0.1.0 github.com/xtls/xray-core v1.250911.0 @@ -35,6 +36,7 @@ require ( github.com/bytedance/sonic/loader v0.3.0 // indirect github.com/cloudflare/circl v1.6.1 // indirect github.com/cloudwego/base64x v0.1.6 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-metro v0.0.0-20250106013310-edb8663e5e33 // indirect github.com/ebitengine/purego v0.9.0 // indirect github.com/gabriel-vasile/mimetype v1.4.10 // indirect @@ -98,6 +100,7 @@ require ( golang.zx2c4.com/wireguard v0.0.0-20250521234502-f333402bd9cb // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9 // indirect google.golang.org/protobuf v1.36.9 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect gvisor.dev/gvisor v0.0.0-20250503011706-39ed1f5ac29c // indirect lukechampine.com/blake3 v1.4.1 // indirect ) diff --git a/go.sum b/go.sum index a4610d2b..9deb4a3d 100644 --- a/go.sum +++ b/go.sum @@ -234,8 +234,6 @@ golang.zx2c4.com/wireguard v0.0.0-20250521234502-f333402bd9cb h1:whnFRlWMcXI9d+Z golang.zx2c4.com/wireguard v0.0.0-20250521234502-f333402bd9cb/go.mod h1:rpwXGsirqLqN2L0JDJQlwOboGHmptD5ZD6T2VmcqhTw= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090 h1:/OQuEa4YWtDt7uQWHd3q3sUMb+QOLQUg1xa8CEsRv5w= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250908214217-97024824d090/go.mod h1:GmFNa4BdJZ2a8G+wCe9Bg3wwThLrJun751XstdJt5Og= google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9 h1:V1jCN2HBa8sySkR5vLcCSqJSTMv093Rw9EJefhQGP7M= google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9/go.mod h1:HSkG/KdJWusxU1F6CNrwNDjBMgisKxGnc5dAZfT0mjQ= google.golang.org/grpc v1.75.1 h1:/ODCNEuf9VghjgO3rqLcfg8fiOP0nSluljWFlDxELLI= diff --git a/web/service/inbound.go b/web/service/inbound.go index bc99cecf..8ab11a88 100644 --- a/web/service/inbound.go +++ b/web/service/inbound.go @@ -2419,7 +2419,8 @@ func (s *InboundService) syncWithSlaves(method string, path string, body io.Read logger.Warningf("Failed to sync with server %s. Status: %s, Body: %s", server.Name, resp.Status, string(bodyBytes)) } } - +} + func (s *InboundService) DelInboundClientByEmail(inboundId int, email string) (bool, error) { oldInbound, err := s.GetInbound(inboundId) if err != nil { diff --git a/web/service/inbound_service_sync_test.go b/web/service/inbound_service_sync_test.go index cba45b55..0e97ac83 100644 --- a/web/service/inbound_service_sync_test.go +++ b/web/service/inbound_service_sync_test.go @@ -8,8 +8,9 @@ import ( "net/url" "strconv" "testing" - "x-ui/database" - "x-ui/database/model" + + "github.com/mhsanaei/3x-ui/v2/database" + "github.com/mhsanaei/3x-ui/v2/database/model" "github.com/stretchr/testify/assert" ) diff --git a/web/service/multi_server_service.go b/web/service/multi_server_service.go index 1450ac05..2491d088 100644 --- a/web/service/multi_server_service.go +++ b/web/service/multi_server_service.go @@ -1,8 +1,8 @@ package service import ( - "x-ui/database" - "x-ui/database/model" + "github.com/mhsanaei/3x-ui/v2/database" + "github.com/mhsanaei/3x-ui/v2/database/model" ) type MultiServerService struct{} diff --git a/web/service/multi_server_service_test.go b/web/service/multi_server_service_test.go index 83cd3968..7014fee9 100644 --- a/web/service/multi_server_service_test.go +++ b/web/service/multi_server_service_test.go @@ -3,8 +3,9 @@ package service import ( "os" "testing" - "x-ui/database" - "x-ui/database/model" + + "github.com/mhsanaei/3x-ui/v2/database" + "github.com/mhsanaei/3x-ui/v2/database/model" "github.com/stretchr/testify/assert" )