Skip to content

Commit

Permalink
Remove configPath as argument for Link function, and Made the config …
Browse files Browse the repository at this point in the history
…path a global variable to use throughout the project
  • Loading branch information
SwayKh committed Sep 10, 2024
1 parent 0087034 commit fcc1311
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/linker/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/SwayKh/linksym/pkg/config"
)

func Link(sourcePath, linkPath, configPath string) error {
func Link(sourcePath, linkPath string) error {
// Get File info, to check if it exists, and if it's a directory or not
fileExists, fileInfo, err := config.CheckFile(sourcePath)

Expand Down Expand Up @@ -37,7 +37,7 @@ func Link(sourcePath, linkPath, configPath string) error {
return fmt.Errorf("Couldn't create symlink %s\n %w", linkPath, err)
}

err = config.AddRecord(sourcePath, linkPath, configPath)
err = config.AddRecord(sourcePath, linkPath)
if err != nil {
return err
}
Expand Down

0 comments on commit fcc1311

Please sign in to comment.