From 36f3c5bc81c34d9d475f7ea69fae9b4f1c03192b Mon Sep 17 00:00:00 2001 From: Adphi Date: Fri, 7 Jul 2023 14:08:34 +0200 Subject: [PATCH] service: WithReact: use fs.FS instead of embed.FS Signed-off-by: Adphi --- service/options.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service/options.go b/service/options.go index f693b2c..c6dd810 100644 --- a/service/options.go +++ b/service/options.go @@ -4,8 +4,8 @@ import ( "context" "crypto/tls" "crypto/x509" - "embed" "fmt" + "io/fs" "net" "os" "strings" @@ -326,7 +326,7 @@ func WithGatewayOpts(opts ...runtime.ServeMuxOption) Option { // WithReactUI add static single page app serving to the http server // subpath is the path in the read-only file embed.FS to use as root to serve // static content -func WithReactUI(fs embed.FS, subpath string) Option { +func WithReactUI(fs fs.FS, subpath string) Option { return func(o *options) { o.reactUI = fs o.reactUISubPath = subpath @@ -375,7 +375,7 @@ type options struct { gatewayOpts []runtime.ServeMuxOption cors cors.Options - reactUI embed.FS + reactUI fs.FS reactUISubPath string hasReactUI bool