Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4bae3e9

Browse files
committed
fix go brackets are weired
1 parent 2e5639a commit 4bae3e9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

agent/agent.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,17 +1406,14 @@ func expandDirectory(dir string) (string, error) {
14061406
return "", err
14071407
}
14081408
dir = filepath.Join(home, dir[1:])
1409-
}
1410-
//if the directory is not absolute, we make it absolute
1411-
else if dir[0] != '/' {
1409+
} else if dir[0] != '/' {
14121410
home, err := userHomeDir()
14131411
if err != nil {
14141412
return "", err
14151413
}
14161414
dir = filepath.Join(home, dir)
1417-
}
1418-
else {
1419-
return "", fmt.Errorf("not a valid directory"
1415+
} else {
1416+
return "", fmt.Errorf("not a valid directory")
14201417
}
14211418
return os.ExpandEnv(dir), nil
14221419
}

0 commit comments

Comments
 (0)