Embed fichiers statiques dans exécutable avec go embed #6
6 changed files with 11 additions and 1 deletions
|
@ -27,7 +27,7 @@ WORKDIR /app
|
||||||
|
|
||||||
ADD contenu/ contenu/
|
ADD contenu/ contenu/
|
||||||
|
|
||||||
ADD static/ static/
|
ADD public/static/ static/
|
||||||
|
|
||||||
COPY --from=build /go/src/app/babillard /usr/bin/babillard
|
COPY --from=build /go/src/app/babillard /usr/bin/babillard
|
||||||
|
|
||||||
|
|
10
public/embed.go
Normal file
10
public/embed.go
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
package public
|
||||||
|
|
||||||
|
import "embed"
|
||||||
|
|
||||||
|
//go:embed static/*
|
||||||
|
var embedFS embed.FS
|
||||||
|
|
||||||
|
func GetEmbedFS() embed.FS {
|
||||||
|
return embedFS
|
||||||
|
}
|
Loading…
Reference in a new issue