Refactor code and fix linter warnings (#3627)

* refactor: use any instead of empty interface

* refactor: code cleanup
This commit is contained in:
Ilya Kryuchkov
2026-01-05 07:54:56 +03:00
committed by GitHub
parent 4800f8fb70
commit 6041d10e3d
16 changed files with 61 additions and 47 deletions

View File

@@ -210,10 +210,10 @@ func (a *ServerController) getXrayLogs(c *gin.Context) {
//getting tags for freedom and blackhole outbounds
config, err := a.settingService.GetDefaultXrayConfig()
if err == nil && config != nil {
if cfgMap, ok := config.(map[string]interface{}); ok {
if outbounds, ok := cfgMap["outbounds"].([]interface{}); ok {
if cfgMap, ok := config.(map[string]any); ok {
if outbounds, ok := cfgMap["outbounds"].([]any); ok {
for _, outbound := range outbounds {
if obMap, ok := outbound.(map[string]interface{}); ok {
if obMap, ok := outbound.(map[string]any); ok {
switch obMap["protocol"] {
case "freedom":
if tag, ok := obMap["tag"].(string); ok {