From 8223a44885e044e0bf274b44ed504f3643cfc8e1 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 25 Dec 2025 12:05:49 +0800 Subject: [PATCH] Fix Redundant Code in LoadWithRoot Function for Path Resolution - Removed unnecessary conditional check in the LoadWithRoot function, streamlining the path resolution logic for the configuration root. - Ensured that the function consistently resolves the absolute path of the configuration root, improving code clarity and maintainability. --- config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 1d932fbf..945b48f9 100644 --- a/config/config.go +++ b/config/config.go @@ -130,7 +130,7 @@ func LoadWithRoot(root string) Config { if root != "" { cfg.Root, _ = filepath.Abs(root) } else { - cfg.Root, _ = filepath.Abs(cfg.Root) + cfg.Root, _ = filepath.Abs(cfg.Root) } // App Root