Skip to content

Commit

Permalink
remove assets, use argument
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Oct 15, 2024
1 parent 725d20d commit d0cf3d6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
5 changes: 1 addition & 4 deletions rest/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package rest

import (
"crypto/tls"
"embed"
"fmt"
"io"
"io/fs"
Expand All @@ -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")
Expand Down
4 changes: 0 additions & 4 deletions rest/static/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion rest/version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package rest

import (
_ "embed"
"fmt"
"io"
"net/http"
Expand Down

0 comments on commit d0cf3d6

Please sign in to comment.