From b68859f90b6077255b799c232158c33b3c824915 Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Fri, 5 May 2023 19:50:43 -0400 Subject: [PATCH] =?UTF-8?q?Pr=C3=A9parer=20=C3=A0=20embed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- public/embed.go | 10 ++++++++++ {static => public/static}/index.html | 0 {static => public/static}/slider.js | 0 {static => public/static}/style.css | 0 {static => public/static}/text.js | 0 6 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 public/embed.go rename {static => public/static}/index.html (100%) rename {static => public/static}/slider.js (100%) rename {static => public/static}/style.css (100%) rename {static => public/static}/text.js (100%) diff --git a/Dockerfile b/Dockerfile index 5fa348b..ea6216c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ WORKDIR /app ADD contenu/ contenu/ -ADD static/ static/ +ADD public/static/ static/ COPY --from=build /go/src/app/babillard /usr/bin/babillard diff --git a/public/embed.go b/public/embed.go new file mode 100644 index 0000000..bfc1ca1 --- /dev/null +++ b/public/embed.go @@ -0,0 +1,10 @@ +package public + +import "embed" + +//go:embed static/* +var embedFS embed.FS + +func GetEmbedFS() embed.FS { + return embedFS +} diff --git a/static/index.html b/public/static/index.html similarity index 100% rename from static/index.html rename to public/static/index.html diff --git a/static/slider.js b/public/static/slider.js similarity index 100% rename from static/slider.js rename to public/static/slider.js diff --git a/static/style.css b/public/static/style.css similarity index 100% rename from static/style.css rename to public/static/style.css diff --git a/static/text.js b/public/static/text.js similarity index 100% rename from static/text.js rename to public/static/text.js