go-backend-starter-project/initializers/assets.go

16 lines
219 B
Go
Raw Normal View History

2024-02-15 00:36:17 +01:00
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)
}
}
}