From 049b9acbd9635c206f5eeb01074b5d63803c4cd5 Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Wed, 19 Jul 2023 21:13:34 +0200 Subject: ref: Remove static fs on root Go embed does allow to load parent folder, so I move static fs to static folder as I think it fits better there than in the root of the project. --- cmd/server/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd') diff --git a/cmd/server/main.go b/cmd/server/main.go index 8f163df..1591102 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -16,7 +16,6 @@ import ( "gorm.io/driver/sqlite" "gorm.io/gorm" - "git.sr.ht/~gabrielgio/img" "git.sr.ht/~gabrielgio/img/pkg/database/localfs" "git.sr.ht/~gabrielgio/img/pkg/database/repository" "git.sr.ht/~gabrielgio/img/pkg/database/sql" @@ -25,6 +24,7 @@ import ( "git.sr.ht/~gabrielgio/img/pkg/view" "git.sr.ht/~gabrielgio/img/pkg/worker" "git.sr.ht/~gabrielgio/img/pkg/worker/scanner" + "git.sr.ht/~gabrielgio/img/static" ) func main() { @@ -72,7 +72,7 @@ func main() { } r := router.New() - r.GET("/static/{filepath:*}", ext.FileServer(img.StaticFS, "static/")) + r.GET("/static/{filepath:*}", ext.FileServer(static.Static, "static/")) // repository var ( -- cgit v1.2.3