initial commit

This commit is contained in:
Daniel Hjartland
2024-11-26 18:08:49 +01:00
commit 75be79c6cf
26 changed files with 1885 additions and 0 deletions

12
assets.go Normal file
View File

@@ -0,0 +1,12 @@
package main
import (
"os"
)
func (cfg apiConfig) ensureAssetsDir() error {
if _, err := os.Stat(cfg.assetsRoot); os.IsNotExist(err) {
return os.Mkdir(cfg.assetsRoot, 0755)
}
return nil
}