Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/xray
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2025-03-12 22:13:51 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2025-03-12 22:43:43 +0300
commit0bde51b91ea505e38569ae3cbe575695abd2db60 (patch)
tree3d27346586f5802d12cdbb7a1fe95c2b5d46156f /xray
parent280a22b57d14a372d99bcc49add515721290678b (diff)
Refactor: Use any instead of interface{}
Diffstat (limited to 'xray')
-rw-r--r--xray/api.go2
-rw-r--r--xray/process.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/xray/api.go b/xray/api.go
index 727ab526..3a2dddd6 100644
--- a/xray/api.go
+++ b/xray/api.go
@@ -92,7 +92,7 @@ func (x *XrayAPI) DelInbound(tag string) error {
return err
}
-func (x *XrayAPI) AddUser(Protocol string, inboundTag string, user map[string]interface{}) error {
+func (x *XrayAPI) AddUser(Protocol string, inboundTag string, user map[string]any) error {
var account *serial.TypedMessage
switch Protocol {
case "vmess":
diff --git a/xray/process.go b/xray/process.go
index b4947864..077ff339 100644
--- a/xray/process.go
+++ b/xray/process.go
@@ -64,7 +64,7 @@ func GetAccessLogPath() (string, error) {
return "", err
}
- jsonConfig := map[string]interface{}{}
+ jsonConfig := map[string]any{}
err = json.Unmarshal([]byte(config), &jsonConfig)
if err != nil {
logger.Warningf("Failed to parse JSON configuration: %s", err)
@@ -72,7 +72,7 @@ func GetAccessLogPath() (string, error) {
}
if jsonConfig["log"] != nil {
- jsonLog := jsonConfig["log"].(map[string]interface{})
+ jsonLog := jsonConfig["log"].(map[string]any)
if jsonLog["access"] != nil {
accessLogPath := jsonLog["access"].(string)
return accessLogPath, nil