From 733f911fadc872933481bcbe087d519ce00372df Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Mon, 2 May 2022 12:07:00 -0700 Subject: cleaned up main --- util/util.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'util') 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) + } +} -- cgit v1.2.3