Skip to content

Commit 79a15e2

Browse files
authored
Merge pull request #478 from warrensbox/fix/Rectify_typo_made_in_PR468
fix: Rectify typo from #468 (+ go fmt)
2 parents c49ef30 + 8f7460b commit 79a15e2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/symlink.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ func CreateSymlink(cwd string, dir string) error {
4747

4848
// RemoveSymlink : remove symlink
4949
func RemoveSymlink(symlinkPath string) error {
50-
5150
_, err := os.Lstat(symlinkPath)
5251
if err != nil {
5352
return fmt.Errorf(`
@@ -75,7 +74,6 @@ func RemoveSymlink(symlinkPath string) error {
7574

7675
// CheckSymlink : check file is symlink
7776
func CheckSymlink(symlinkPath string) bool {
78-
7977
fi, err := os.Lstat(symlinkPath)
8078
if err != nil {
8179
return false
@@ -101,8 +99,7 @@ func ChangeSymlink(binVersionPath string, binPath string) {
10199

102100
// ChangeProductSymlink : move symlink for product to existing binary
103101
func ChangeProductSymlink(product Product, binVersionPath string, userBinPath string) error {
104-
105-
homedir := GetHomeDirectory() //get user's home directory
102+
homedir := GetHomeDirectory() // get user's home directory
106103
homeBinPath := filepath.Join(homedir, "bin", product.GetExecutableName())
107104
possibleInstallLocations := []string{userBinPath, homeBinPath}
108105
var err error
@@ -126,7 +123,7 @@ func ChangeProductSymlink(product Product, binVersionPath string, userBinPath st
126123

127124
if err == nil {
128125
return fmt.Errorf("Unable to find existing directory in %q. %s",
129-
strings. Join(possibleInstallLocations, " or "),
126+
strings.Join(possibleInstallLocations, " or "),
130127
"Manually create one of them and try again.")
131128
}
132129

0 commit comments

Comments
 (0)