mirror of
https://github.com/nitezs/sub2clash.git
synced 2024-12-25 02:04:41 -05:00
17 lines
206 B
Go
17 lines
206 B
Go
|
package utils
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
func MKDir(dir string) error {
|
||
|
if _, err := os.Stat(dir); os.IsNotExist(err) {
|
||
|
err := os.MkdirAll(dir, os.ModePerm)
|
||
|
if err != nil {
|
||
|
|
||
|
return err
|
||
|
}
|
||
|
}
|
||
|
return nil
|
||
|
}
|