mirror of
https://github.com/bettercap/bettercap
synced 2025-08-13 18:26:57 -07:00
if block ends with a return statement drop this else and outdent its block
This commit is contained in:
parent
84864d5dc9
commit
8193834f0f
1 changed files with 2 additions and 3 deletions
|
@ -92,10 +92,9 @@ func ExpandPath(path string) (string, error) {
|
|||
if strings.HasPrefix(path, "~") {
|
||||
if usr, err := user.Current(); err != nil {
|
||||
return "", err
|
||||
} else {
|
||||
// Replace only the first occurrence of ~
|
||||
path = strings.Replace(path, "~", usr.HomeDir, 1)
|
||||
}
|
||||
// Replace only the first occurrence of ~
|
||||
path = strings.Replace(path, "~", usr.HomeDir, 1)
|
||||
}
|
||||
return filepath.Abs(path)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue