ensures storage path exists

This commit is contained in:
2026-05-06 21:43:04 -06:00
parent e2ae8f41e9
commit 420cf6711e
+9
View File
@@ -8,6 +8,13 @@ import (
"github.com/joho/godotenv"
)
func resolveFileStorePath(path string) {
err := os.MkdirAll(path, os.ModePerm)
if err != nil {
log.Fatal(err)
}
}
func main() {
err := godotenv.Load()
if err != nil {
@@ -18,6 +25,8 @@ func main() {
storage_path := os.Getenv("STORAGE_PATH")
resolveFileStorePath(storage_path)
fmt.Printf("in the future I will listen on port: %s\n", port)
fmt.Printf("Reading files from: %s\n", storage_path)
}