go-backend-starter-project/initializers/assets.go
2024-02-15 00:36:17 +01:00

15 lines
219 B
Go

package initializers
import (
"log"
"os"
)
func CreateAssetsFolders() {
if _, err := os.Stat("assets"); os.IsNotExist(err) {
if err := os.MkdirAll("assets", os.ModePerm); err != nil {
log.Fatal(err)
}
}
}