This commit is contained in:
Aliberk Sandıkçı 2023-07-30 13:08:15 +03:00
parent fc19e3659f
commit c0230ce765
Signed by: asandikci
GPG key ID: 25C67A03B5666BC1

View file

@ -21,20 +21,17 @@ func checkExists(path string) (bool, error) {
}
func Info() {
log.Print("log3")
// A SAMPLE COMMAND FOR LOGGING OS INFORMATION TO A DEDICATED FILE
userhome, err := os.UserHomeDir() // TODO $HOME is not defined while running as daemon !!!
if err != nil {
log.Fatal(err)
}
log.Print("log4")
// userhome := "/home/asandikci" // TEMPORARY
configDir := userhome + "/.config/" + ProgramName + "/"
// TODO Will be replaced with a Go Config Library
log.Print(configDir)
if flag, err := checkExists(configDir); flag {
log.Println("Config dir already exists")
if err != nil {
log.Fatal(err)
}