aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorWilliam Hergès <william@herges.fr>2025-08-15 21:12:11 +0200
committerWilliam Hergès <william@herges.fr>2025-08-15 21:12:11 +0200
commit91f2ef06c09b7dce9c5a9708f6d9d40ee157a90f (patch)
tree3151d755b2c4931125d597a3a348f86e5404451c /main.go
parent7b5d816992fe26594fbfbedfd46baef708b9d1ca (diff)
feat(config): support every path
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/main.go b/main.go
index 23c3f69..35f8e78 100644
--- a/main.go
+++ b/main.go
@@ -24,10 +24,10 @@ var (
var (
domain string
configPath string
- dev bool = false
+ dev = false
generateToml bool
generateJson bool
- port int = 80
+ port = 80
)
func init() {
@@ -82,11 +82,15 @@ func main() {
var g *golatt.Golatt
if dev {
- g = golatt.New(golatt.UsableEmbedFS("templates", templates), os.DirFS("public"), os.DirFS("dist"))
+ g = golatt.New(
+ golatt.UsableEmbedFS("templates", templates),
+ os.DirFS(getPath("public")),
+ os.DirFS("dist"),
+ )
} else {
g = golatt.New(
golatt.UsableEmbedFS("templates", templates),
- os.DirFS("public"),
+ os.DirFS(getPath("public")),
golatt.UsableEmbedFS("dist", assets),
)
}