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.
This commit is contained in:
parent
7f44e442da
commit
8223a44885
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue