tmp
This commit is contained in:
parent
fc19e3659f
commit
c0230ce765
1 changed files with 1 additions and 4 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue