golang create file and directory if not exists code example
Example: golang create folder if not exist
if _, err := os.Stat(path); os.IsNotExist(err) {
os.Mkdir(path, mode)
}
if _, err := os.Stat(path); os.IsNotExist(err) {
os.Mkdir(path, mode)
}