diff options
author | FChannel <> | 2022-05-02 12:07:00 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | 733f911fadc872933481bcbe087d519ce00372df (patch) | |
tree | 54788da4f730bd11934401c1eca48a3c87f08027 /util | |
parent | e80fe14f7985f9e85bfb9582926acd7891455786 (diff) |
cleaned up main
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) + } +} |