From fcc131100b93cd0d378d43b5a30c759e4883167a Mon Sep 17 00:00:00 2001 From: SwayKh Date: Tue, 10 Sep 2024 20:13:08 +0530 Subject: [PATCH] Remove configPath as argument for Link function, and Made the config path a global variable to use throughout the project --- pkg/linker/link.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/linker/link.go b/pkg/linker/link.go index a3257dc..6195a4a 100644 --- a/pkg/linker/link.go +++ b/pkg/linker/link.go @@ -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) @@ -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 }