use filepath to join the path to the csv file

this ensures `\` on the path on windows
This commit is contained in:
Sharun 2022-06-11 19:42:50 +05:30 committed by Pierre Carrier
parent 9f120664a3
commit c8ef25b018

@ -5,7 +5,7 @@ import (
"log" "log"
"os" "os"
"os/user" "os/user"
"path" "path/filepath"
"strings" "strings"
"syscall" "syscall"
"text/tabwriter" "text/tabwriter"
@ -21,7 +21,7 @@ func main() {
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
cfgPath = path.Join(user.HomeDir, ".config/gauth.csv") cfgPath = filepath.Join(user.HomeDir, ".config", "gauth.csv")
} }
cfgContent, err := gauth.LoadConfigFile(cfgPath, getPassword) cfgContent, err := gauth.LoadConfigFile(cfgPath, getPassword)