From 91f2ef06c09b7dce9c5a9708f6d9d40ee157a90f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Fri, 15 Aug 2025 21:12:11 +0200 Subject: feat(config): support every path --- main.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'main.go') 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), ) } -- cgit v1.2.3