From d0cf3d638954acce1f82ebd655d1c4593e091d40 Mon Sep 17 00:00:00 2001 From: Edward Viaene Date: Tue, 15 Oct 2024 12:14:57 -0500 Subject: [PATCH] remove assets, use argument --- rest/server.go | 5 +---- rest/static/.gitignore | 4 ---- rest/version.go | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 rest/static/.gitignore diff --git a/rest/server.go b/rest/server.go index c320cbd..b2c2e80 100644 --- a/rest/server.go +++ b/rest/server.go @@ -2,7 +2,6 @@ package rest import ( "crypto/tls" - "embed" "fmt" "io" "io/fs" @@ -15,13 +14,11 @@ import ( ) var ( - //go:embed static - assets embed.FS enableTLSWaiter chan (bool) = make(chan bool) TLSWaiterCompleted bool ) -func StartServer(httpPort, httpsPort int, serverType string, storage storage.Iface, c *Context) { +func StartServer(httpPort, httpsPort int, serverType string, storage storage.Iface, c *Context, assets fs.FS) { go handleSignals(c) assetsFS, err := fs.Sub(assets, "static") diff --git a/rest/static/.gitignore b/rest/static/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/rest/static/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/rest/version.go b/rest/version.go index 498cd82..1f7ab3a 100644 --- a/rest/version.go +++ b/rest/version.go @@ -1,7 +1,6 @@ package rest import ( - _ "embed" "fmt" "io" "net/http"