2021-09-29 23:57:09 +00:00
|
|
|
package utils
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Mkdir(dir string) {
|
|
|
|
if _, err := os.Stat(dir); err != nil {
|
|
|
|
if os.IsNotExist(err) {
|
2021-10-22 02:24:39 +00:00
|
|
|
err = os.MkdirAll(dir, CreateDirMode)
|
2021-09-29 23:57:09 +00:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|