Skip to content

Commit

Permalink
fixed return error
Browse files Browse the repository at this point in the history
  • Loading branch information
warrensbox committed May 22, 2018
1 parent 98e0889 commit 6d8f176
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/symlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import (
//CreateSymlink : create symlink
func CreateSymlink(cwd string, dir string) error {

if err := os.Symlink(cwd, dir); err != nil {
err := os.Symlink(cwd, dir)
if err != nil {
return err
}
return nil
Expand All @@ -16,7 +17,8 @@ func CreateSymlink(cwd string, dir string) error {
//RemoveSymlink : remove symlink
func RemoveSymlink(symlinkPath string) error {

if _, err := os.Lstat(symlinkPath); err != nil {
_, err := os.Lstat(symlinkPath)
if err != nil {
return err
}
os.Remove(symlinkPath)
Expand Down

0 comments on commit 6d8f176

Please sign in to comment.