move templates from rakyll/statik to go:embed

There is no need for the rakyll/statik package starting with Go 1.16,
which provides us with tools for embedding files
without third-party libraries.
This commit is contained in:
Dmitry Verkhoturov
2022-07-29 19:07:49 +02:00
parent 76f5ce32ca
commit 86d059bf99
21 changed files with 39 additions and 137 deletions
-2
View File
@@ -36,8 +36,6 @@ RUN \
export WEB_ROOT=/build/backend/web && \
find . -regex '.*\.\(html\|js\|mjs\)$' -print -exec sed -i "s|{% REMARK_URL %}|http://127.0.0.1:8080|g" {} \; && \
statik --src=${WEB_ROOT} --dest=/build/backend/app/rest -p api -f && \
statik --src=/build/backend/templates --dest=/build/backend/app -p templates -ns templates -f && \
ls -la /build/backend/app/templates/statik.go && \
ls -la /build/backend/app/rest/api/statik.go && \
ls -la /build/backend/web/