From 6041d10e3d5d8b0021dd596bdee8f0064a495f80 Mon Sep 17 00:00:00 2001 From: Ilya Kryuchkov <42733472+kr-ilya@users.noreply.github.com> Date: Mon, 5 Jan 2026 07:54:56 +0300 Subject: Refactor code and fix linter warnings (#3627) * refactor: use any instead of empty interface * refactor: code cleanup --- sub/subJsonService.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sub/subJsonService.go') diff --git a/sub/subJsonService.go b/sub/subJsonService.go index 86a7a405..8222491a 100644 --- a/sub/subJsonService.go +++ b/sub/subJsonService.go @@ -4,6 +4,7 @@ import ( _ "embed" "encoding/json" "fmt" + "maps" "strings" "github.com/mhsanaei/3x-ui/v2/database/model" @@ -197,9 +198,8 @@ func (s *SubJsonService) getConfig(inbound *model.Inbound, client model.Client, newOutbounds = append(newOutbounds, s.defaultOutbounds...) newConfigJson := make(map[string]any) - for key, value := range s.configJson { - newConfigJson[key] = value - } + maps.Copy(newConfigJson, s.configJson) + newConfigJson["outbounds"] = newOutbounds newConfigJson["remarks"] = s.SubService.genRemark(inbound, client.Email, extPrxy["remark"].(string)) -- cgit v1.2.3