diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/util.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/util.go b/util/util.go index ade5eae..0ffbf01 100644 --- a/util/util.go +++ b/util/util.go @@ -251,3 +251,13 @@ func GetContentType(location string) string { return location } } + +func CreatedNeededDirectories() { + if _, err := os.Stat("./public"); os.IsNotExist(err) { + os.Mkdir("./public", 0755) + } + + if _, err := os.Stat("./pem/board"); os.IsNotExist(err) { + os.MkdirAll("./pem/board", 0700) + } +} |