I\'m trying to create a log file at the start of my program.
I need to check if a \"/log\" directory exists if it doesn\'t create the directory then move on to creat
You can reset the umask to 0. I would call this as the first thing in my main file
syscall.Umask(0)
Example
_ = os.MkdirAll("/tmp/dirs/1", 0664) syscall.Umask(0) _ = os.MkdirAll("/tmp/dirs/2", 0664)
Result
/tmp/dirs$ stat -c '%A %a %n' * drw-r--r-- 644 1 drw-rw-r-- 664 2