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

View File

@ -5,7 +5,7 @@ import (
"log"
"os"
"os/user"
"path"
"path/filepath"
"strings"
"syscall"
"text/tabwriter"
@ -21,7 +21,7 @@ func main() {
if err != nil {
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)