From 2142bc5747aaf1fcb9c8496493f79fc230090f43 Mon Sep 17 00:00:00 2001 From: Marc Ole Bulling Date: Tue, 13 Apr 2021 12:03:08 +0200 Subject: [PATCH] Refactoring to comply with standard go package structure --- Dockerfile | 2 +- Main.go | 16 ++++++++-------- README.md | 2 +- {.release => build}/Dockerfile | 2 +- {.release => build}/entrypoint.sh | 4 ++-- {.release => build}/go.mod | 0 {.release => build}/setVersionTemplate.sh | 2 +- .../configuration/Configuration.go | 8 ++++---- {src => internal}/environment/BuildVars.go | 0 {src => internal}/environment/Environment.go | 0 {src => internal}/helper/OS.go | 0 {src => internal}/helper/StringGeneration.go | 0 {src => internal}/storage/FileServing.go | 6 +++--- .../storage/filestructure/FileList.go | 0 {src => internal}/webserver/SessionManager.go | 6 +++--- {src => internal}/webserver/Webserver.go | 17 ++++++++++------- .../webserver/sessionstructure/Session.go | 0 templates/string_constants.tmpl | 2 -- .../static}/android-chrome-192x192.png | Bin .../static}/android-chrome-512x512.png | Bin {static => web/static}/apple-touch-icon.png | Bin {static => web/static}/assets/background.jpg | Bin .../static}/assets/dist/css/bootstrap.min.css | 0 .../assets/dist/css/bootstrap.min.css.map | 0 .../assets/dist/css/bootstrap.rtl.min.css | 0 .../assets/dist/css/bootstrap.rtl.min.css.map | 0 .../static}/assets/dist/css/dropzone.min.css | 0 .../static}/assets/dist/css/index.html | 0 {static => web/static}/assets/dist/index.html | 0 .../assets/dist/js/bootstrap.bundle.min.js | 0 .../assets/dist/js/bootstrap.bundle.min.js.map | 0 .../static}/assets/dist/js/clipboard.min.js | 0 .../static}/assets/dist/js/dropzone.min.js | 0 .../static}/assets/dist/js/index.html | 0 .../static}/assets/dist/js/jquery.min.js | 0 {static => web/static}/assets/index.html | 0 {static => web/static}/css/cover.css | 0 {static => web/static}/css/index.html | 0 {static => web/static}/expired.png | Bin {static => web/static}/favicon-16x16.png | Bin {static => web/static}/favicon-32x32.png | Bin {static => web/static}/favicon.ico | Bin {static => web/static}/index.html | 0 {static => web/static}/js/admin.js | 0 {static => web/static}/js/index.html | 0 {static => web/static}/robots.txt | 0 {static => web/static}/site.webmanifest | 0 {templates => web/templates}/html_admin.tmpl | 0 .../templates}/html_download.tmpl | 0 .../templates}/html_download_password.tmpl | 0 {templates => web/templates}/html_error.tmpl | 0 {templates => web/templates}/html_footer.tmpl | 0 .../templates}/html_forgotpw.tmpl | 0 {templates => web/templates}/html_header.tmpl | 2 +- {templates => web/templates}/html_index.tmpl | 0 {templates => web/templates}/html_login.tmpl | 0 web/templates/string_constants.tmpl | 2 ++ 57 files changed, 37 insertions(+), 34 deletions(-) rename {.release => build}/Dockerfile (95%) rename {.release => build}/entrypoint.sh (81%) rename {.release => build}/go.mod (100%) rename {.release => build}/setVersionTemplate.sh (75%) rename {src => internal}/configuration/Configuration.go (98%) rename {src => internal}/environment/BuildVars.go (100%) rename {src => internal}/environment/Environment.go (100%) rename {src => internal}/helper/OS.go (100%) rename {src => internal}/helper/StringGeneration.go (100%) rename {src => internal}/storage/FileServing.go (98%) rename {src => internal}/storage/filestructure/FileList.go (100%) rename {src => internal}/webserver/SessionManager.go (95%) rename {src => internal}/webserver/Webserver.go (96%) rename {src => internal}/webserver/sessionstructure/Session.go (100%) delete mode 100644 templates/string_constants.tmpl rename {static => web/static}/android-chrome-192x192.png (100%) rename {static => web/static}/android-chrome-512x512.png (100%) rename {static => web/static}/apple-touch-icon.png (100%) rename {static => web/static}/assets/background.jpg (100%) rename {static => web/static}/assets/dist/css/bootstrap.min.css (100%) rename {static => web/static}/assets/dist/css/bootstrap.min.css.map (100%) rename {static => web/static}/assets/dist/css/bootstrap.rtl.min.css (100%) rename {static => web/static}/assets/dist/css/bootstrap.rtl.min.css.map (100%) rename {static => web/static}/assets/dist/css/dropzone.min.css (100%) rename {static => web/static}/assets/dist/css/index.html (100%) rename {static => web/static}/assets/dist/index.html (100%) rename {static => web/static}/assets/dist/js/bootstrap.bundle.min.js (100%) rename {static => web/static}/assets/dist/js/bootstrap.bundle.min.js.map (100%) rename {static => web/static}/assets/dist/js/clipboard.min.js (100%) rename {static => web/static}/assets/dist/js/dropzone.min.js (100%) rename {static => web/static}/assets/dist/js/index.html (100%) rename {static => web/static}/assets/dist/js/jquery.min.js (100%) rename {static => web/static}/assets/index.html (100%) rename {static => web/static}/css/cover.css (100%) rename {static => web/static}/css/index.html (100%) rename {static => web/static}/expired.png (100%) rename {static => web/static}/favicon-16x16.png (100%) rename {static => web/static}/favicon-32x32.png (100%) rename {static => web/static}/favicon.ico (100%) rename {static => web/static}/index.html (100%) rename {static => web/static}/js/admin.js (100%) rename {static => web/static}/js/index.html (100%) rename {static => web/static}/robots.txt (100%) rename {static => web/static}/site.webmanifest (100%) rename {templates => web/templates}/html_admin.tmpl (100%) rename {templates => web/templates}/html_download.tmpl (100%) rename {templates => web/templates}/html_download_password.tmpl (100%) rename {templates => web/templates}/html_error.tmpl (100%) rename {templates => web/templates}/html_footer.tmpl (100%) rename {templates => web/templates}/html_forgotpw.tmpl (100%) rename {templates => web/templates}/html_header.tmpl (95%) rename {templates => web/templates}/html_index.tmpl (100%) rename {templates => web/templates}/html_login.tmpl (100%) create mode 100644 web/templates/string_constants.tmpl diff --git a/Dockerfile b/Dockerfile index cea1d71..fea1d04 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN cd /compile && go mod download COPY . /compile -RUN cd /compile && go generate && CGO_ENABLED=0 go build -ldflags="-s -w -X 'Gokapi/src/environment.IsDocker=true' -X 'Gokapi/src/environment.Builder=Project Docker File' -X 'Gokapi/src/environment.BuildTime=$(date)'" -o /compile/gokapi +RUN cd /compile && go generate && CGO_ENABLED=0 go build -ldflags="-s -w -X 'Gokapi/internal/environment.IsDocker=true' -X 'Gokapi/internal/environment.Builder=Project Docker File' -X 'Gokapi/internal/environment.BuildTime=$(date)'" -o /compile/gokapi FROM alpine:3.13 diff --git a/Main.go b/Main.go index a4f0bdf..5d0b89b 100644 --- a/Main.go +++ b/Main.go @@ -5,10 +5,10 @@ Main routine */ import ( - "Gokapi/src/configuration" - "Gokapi/src/environment" - "Gokapi/src/storage" - "Gokapi/src/webserver" + "Gokapi/internal/configuration" + "Gokapi/internal/environment" + "Gokapi/internal/storage" + "Gokapi/internal/webserver" "embed" "fmt" "math/rand" @@ -18,9 +18,9 @@ import ( // Current version in readable form. The go generate call below // needs to be modified as well -const VERSION = "1.1.3" +const VERSION = "1.1.4-dev" -//go:generate sh "./.release/setVersionTemplate.sh" "1.1.3" +//go:generate sh "./build/setVersionTemplate.sh" "1.1.4-dev" // Main routine that is called on startup func main() { @@ -61,12 +61,12 @@ func checkArguments() { // Embedded version of the "static" folder // This contains JS files, CSS, images etc -//go:embed static +//go:embed web/static var staticFolderEmbedded embed.FS // Embedded version of the "templates" folder // This contains templates that Gokapi uses for creating the HTML output -//go:embed templates +//go:embed web/templates var templateFolderEmbedded embed.FS // ASCII art logo diff --git a/README.md b/README.md index 1a704e4..1dbd198 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ For Linux environments, execute the binary in this format: `GOKAPI_USERNAME=admi By default, all files are included in the executable. If you want to change the layout (e.g. add your company logo or change the app name etc.), follow these steps: * Clone this repository -* Copy either the folder `static`, `templates` or both to the directory where the executable is located +* Copy either the folder `static`, `templates` or both from the `web` folder to the directory where the executable is located * Make changes to the folders. `static` contains images, CSS files and JavaScript. `templates` contains the HTML code. * Restart the server. If the folders exist, the server will use the local files instead of the embedded files * Optional: To embed the files permanently, the executable needs to be recompiled with `go build`. diff --git a/.release/Dockerfile b/build/Dockerfile similarity index 95% rename from .release/Dockerfile rename to build/Dockerfile index a37fa52..cd5620a 100644 --- a/.release/Dockerfile +++ b/build/Dockerfile @@ -1,7 +1,7 @@ FROM golang:1.16 ## To compile: -## cd Gokapi/release/ +## cd Gokapi/build/ ## docker build . --tag gokapi-builder ## docker run --rm -it -v ../:/usr/src/myapp -w /usr/src/myapp gokapi-builder diff --git a/.release/entrypoint.sh b/build/entrypoint.sh similarity index 81% rename from .release/entrypoint.sh rename to build/entrypoint.sh index 064a373..b25f5ef 100755 --- a/.release/entrypoint.sh +++ b/build/entrypoint.sh @@ -17,11 +17,11 @@ for target in $targets; do fi echo "----> Building project for: $target" - GOOS=$os GOARCH=$arch CGO_ENABLED=0 go build -ldflags="-s -w -X 'Gokapi/src/environment.Builder=Github Release Builder' -X 'Gokapi/src/environment.BuildTime=$(date)'" -o $output + GOOS=$os GOARCH=$arch CGO_ENABLED=0 go build -ldflags="-s -w -X 'Gokapi/internal/environment.Builder=Github Release Builder' -X 'Gokapi/internal/environment.BuildTime=$(date)'" -o $output zip -j $output.zip $output > /dev/null rm $output done echo "----> Build is complete. List of files at $release_path:" -cd .release/ +cd build/ ls -l gokapi-* diff --git a/.release/go.mod b/build/go.mod similarity index 100% rename from .release/go.mod rename to build/go.mod diff --git a/.release/setVersionTemplate.sh b/build/setVersionTemplate.sh similarity index 75% rename from .release/setVersionTemplate.sh rename to build/setVersionTemplate.sh index cca26a1..bcc5b1f 100755 --- a/.release/setVersionTemplate.sh +++ b/build/setVersionTemplate.sh @@ -1,4 +1,4 @@ #!/bin/sh #Called by go generate #Sets the version number in the template automatically - sed -i 's/{{define "version"}}.*{{end}}/{{define "version"}}'$1'{{end}}/g' ./templates/string_constants.tmpl + sed -i 's/{{define "version"}}.*{{end}}/{{define "version"}}'$1'{{end}}/g' ./web/templates/string_constants.tmpl diff --git a/src/configuration/Configuration.go b/internal/configuration/Configuration.go similarity index 98% rename from src/configuration/Configuration.go rename to internal/configuration/Configuration.go index be9874b..056977c 100644 --- a/src/configuration/Configuration.go +++ b/internal/configuration/Configuration.go @@ -5,10 +5,10 @@ Loading and saving of the persistent configuration */ import ( - "Gokapi/src/environment" - "Gokapi/src/helper" - "Gokapi/src/storage/filestructure" - "Gokapi/src/webserver/sessionstructure" + "Gokapi/internal/environment" + "Gokapi/internal/helper" + "Gokapi/internal/storage/filestructure" + "Gokapi/internal/webserver/sessionstructure" "crypto/sha1" "encoding/hex" "encoding/json" diff --git a/src/environment/BuildVars.go b/internal/environment/BuildVars.go similarity index 100% rename from src/environment/BuildVars.go rename to internal/environment/BuildVars.go diff --git a/src/environment/Environment.go b/internal/environment/Environment.go similarity index 100% rename from src/environment/Environment.go rename to internal/environment/Environment.go diff --git a/src/helper/OS.go b/internal/helper/OS.go similarity index 100% rename from src/helper/OS.go rename to internal/helper/OS.go diff --git a/src/helper/StringGeneration.go b/internal/helper/StringGeneration.go similarity index 100% rename from src/helper/StringGeneration.go rename to internal/helper/StringGeneration.go diff --git a/src/storage/FileServing.go b/internal/storage/FileServing.go similarity index 98% rename from src/storage/FileServing.go rename to internal/storage/FileServing.go index ee75700..26151f1 100644 --- a/src/storage/FileServing.go +++ b/internal/storage/FileServing.go @@ -5,9 +5,9 @@ Serving and processing uploaded files */ import ( - "Gokapi/src/configuration" - "Gokapi/src/helper" - "Gokapi/src/storage/filestructure" + "Gokapi/internal/configuration" + "Gokapi/internal/helper" + "Gokapi/internal/storage/filestructure" "crypto/sha1" "encoding/hex" "fmt" diff --git a/src/storage/filestructure/FileList.go b/internal/storage/filestructure/FileList.go similarity index 100% rename from src/storage/filestructure/FileList.go rename to internal/storage/filestructure/FileList.go diff --git a/src/webserver/SessionManager.go b/internal/webserver/SessionManager.go similarity index 95% rename from src/webserver/SessionManager.go rename to internal/webserver/SessionManager.go index 6e5c4db..9f4486a 100644 --- a/src/webserver/SessionManager.go +++ b/internal/webserver/SessionManager.go @@ -5,9 +5,9 @@ Manages the sessions for the admin user or to access password protected files */ import ( - "Gokapi/src/configuration" - "Gokapi/src/helper" - "Gokapi/src/webserver/sessionstructure" + "Gokapi/internal/configuration" + "Gokapi/internal/helper" + "Gokapi/internal/webserver/sessionstructure" "net/http" "time" ) diff --git a/src/webserver/Webserver.go b/internal/webserver/Webserver.go similarity index 96% rename from src/webserver/Webserver.go rename to internal/webserver/Webserver.go index bb25d5b..f562d9c 100644 --- a/src/webserver/Webserver.go +++ b/internal/webserver/Webserver.go @@ -5,10 +5,10 @@ Handling of webserver and requests / uploads */ import ( - "Gokapi/src/configuration" - "Gokapi/src/helper" - "Gokapi/src/storage" - "Gokapi/src/storage/filestructure" + "Gokapi/internal/configuration" + "Gokapi/internal/helper" + "Gokapi/internal/storage" + "Gokapi/internal/storage/filestructure" "embed" "fmt" "html/template" @@ -34,7 +34,7 @@ const expiredFile = "static/expired.png" // Starts the webserver on the port set in the config func Start(staticFolderEmbedded, templateFolderEmbedded *embed.FS) { initTemplates(*templateFolderEmbedded) - webserverDir, _ := fs.Sub(*staticFolderEmbedded, "static") + webserverDir, _ := fs.Sub(*staticFolderEmbedded, "web/static") var err error if helper.FolderExists("static") { fmt.Println("Found folder 'static', using local folder instead of internal static folder") @@ -43,7 +43,7 @@ func Start(staticFolderEmbedded, templateFolderEmbedded *embed.FS) { helper.Check(err) } else { http.Handle("/", http.FileServer(http.FS(webserverDir))) - imageExpiredPicture, err = fs.ReadFile(staticFolderEmbedded, expiredFile) + imageExpiredPicture, err = fs.ReadFile(staticFolderEmbedded, "web/"+expiredFile) helper.Check(err) } http.HandleFunc("/index", showIndex) @@ -77,7 +77,7 @@ func initTemplates(templateFolderEmbedded embed.FS) { templateFolder, err = template.ParseGlob("templates/*.tmpl") helper.Check(err) } else { - templateFolder, err = template.ParseFS(templateFolderEmbedded, "templates/*.tmpl") + templateFolder, err = template.ParseFS(templateFolderEmbedded, "web/templates/*.tmpl") helper.Check(err) } } @@ -259,6 +259,8 @@ type UploadView struct { DefaultExpiry int DefaultPassword string IsAdminView bool + IsMainView bool + IsApiView bool } // Converts the globalConfig variable to an UploadView struct to pass the infos to @@ -283,6 +285,7 @@ func (u *UploadView) convertGlobalConfig() *UploadView { u.DefaultDownloads = configuration.ServerSettings.DefaultDownloads u.TimeNow = time.Now().Unix() u.IsAdminView = true + u.IsMainView = true return u } diff --git a/src/webserver/sessionstructure/Session.go b/internal/webserver/sessionstructure/Session.go similarity index 100% rename from src/webserver/sessionstructure/Session.go rename to internal/webserver/sessionstructure/Session.go diff --git a/templates/string_constants.tmpl b/templates/string_constants.tmpl deleted file mode 100644 index c69eb56..0000000 --- a/templates/string_constants.tmpl +++ /dev/null @@ -1,2 +0,0 @@ -{{define "app_name"}}Gokapi{{end}} -{{define "version"}}1.1.3{{end}} diff --git a/static/android-chrome-192x192.png b/web/static/android-chrome-192x192.png similarity index 100% rename from static/android-chrome-192x192.png rename to web/static/android-chrome-192x192.png diff --git a/static/android-chrome-512x512.png b/web/static/android-chrome-512x512.png similarity index 100% rename from static/android-chrome-512x512.png rename to web/static/android-chrome-512x512.png diff --git a/static/apple-touch-icon.png b/web/static/apple-touch-icon.png similarity index 100% rename from static/apple-touch-icon.png rename to web/static/apple-touch-icon.png diff --git a/static/assets/background.jpg b/web/static/assets/background.jpg similarity index 100% rename from static/assets/background.jpg rename to web/static/assets/background.jpg diff --git a/static/assets/dist/css/bootstrap.min.css b/web/static/assets/dist/css/bootstrap.min.css similarity index 100% rename from static/assets/dist/css/bootstrap.min.css rename to web/static/assets/dist/css/bootstrap.min.css diff --git a/static/assets/dist/css/bootstrap.min.css.map b/web/static/assets/dist/css/bootstrap.min.css.map similarity index 100% rename from static/assets/dist/css/bootstrap.min.css.map rename to web/static/assets/dist/css/bootstrap.min.css.map diff --git a/static/assets/dist/css/bootstrap.rtl.min.css b/web/static/assets/dist/css/bootstrap.rtl.min.css similarity index 100% rename from static/assets/dist/css/bootstrap.rtl.min.css rename to web/static/assets/dist/css/bootstrap.rtl.min.css diff --git a/static/assets/dist/css/bootstrap.rtl.min.css.map b/web/static/assets/dist/css/bootstrap.rtl.min.css.map similarity index 100% rename from static/assets/dist/css/bootstrap.rtl.min.css.map rename to web/static/assets/dist/css/bootstrap.rtl.min.css.map diff --git a/static/assets/dist/css/dropzone.min.css b/web/static/assets/dist/css/dropzone.min.css similarity index 100% rename from static/assets/dist/css/dropzone.min.css rename to web/static/assets/dist/css/dropzone.min.css diff --git a/static/assets/dist/css/index.html b/web/static/assets/dist/css/index.html similarity index 100% rename from static/assets/dist/css/index.html rename to web/static/assets/dist/css/index.html diff --git a/static/assets/dist/index.html b/web/static/assets/dist/index.html similarity index 100% rename from static/assets/dist/index.html rename to web/static/assets/dist/index.html diff --git a/static/assets/dist/js/bootstrap.bundle.min.js b/web/static/assets/dist/js/bootstrap.bundle.min.js similarity index 100% rename from static/assets/dist/js/bootstrap.bundle.min.js rename to web/static/assets/dist/js/bootstrap.bundle.min.js diff --git a/static/assets/dist/js/bootstrap.bundle.min.js.map b/web/static/assets/dist/js/bootstrap.bundle.min.js.map similarity index 100% rename from static/assets/dist/js/bootstrap.bundle.min.js.map rename to web/static/assets/dist/js/bootstrap.bundle.min.js.map diff --git a/static/assets/dist/js/clipboard.min.js b/web/static/assets/dist/js/clipboard.min.js similarity index 100% rename from static/assets/dist/js/clipboard.min.js rename to web/static/assets/dist/js/clipboard.min.js diff --git a/static/assets/dist/js/dropzone.min.js b/web/static/assets/dist/js/dropzone.min.js similarity index 100% rename from static/assets/dist/js/dropzone.min.js rename to web/static/assets/dist/js/dropzone.min.js diff --git a/static/assets/dist/js/index.html b/web/static/assets/dist/js/index.html similarity index 100% rename from static/assets/dist/js/index.html rename to web/static/assets/dist/js/index.html diff --git a/static/assets/dist/js/jquery.min.js b/web/static/assets/dist/js/jquery.min.js similarity index 100% rename from static/assets/dist/js/jquery.min.js rename to web/static/assets/dist/js/jquery.min.js diff --git a/static/assets/index.html b/web/static/assets/index.html similarity index 100% rename from static/assets/index.html rename to web/static/assets/index.html diff --git a/static/css/cover.css b/web/static/css/cover.css similarity index 100% rename from static/css/cover.css rename to web/static/css/cover.css diff --git a/static/css/index.html b/web/static/css/index.html similarity index 100% rename from static/css/index.html rename to web/static/css/index.html diff --git a/static/expired.png b/web/static/expired.png similarity index 100% rename from static/expired.png rename to web/static/expired.png diff --git a/static/favicon-16x16.png b/web/static/favicon-16x16.png similarity index 100% rename from static/favicon-16x16.png rename to web/static/favicon-16x16.png diff --git a/static/favicon-32x32.png b/web/static/favicon-32x32.png similarity index 100% rename from static/favicon-32x32.png rename to web/static/favicon-32x32.png diff --git a/static/favicon.ico b/web/static/favicon.ico similarity index 100% rename from static/favicon.ico rename to web/static/favicon.ico diff --git a/static/index.html b/web/static/index.html similarity index 100% rename from static/index.html rename to web/static/index.html diff --git a/static/js/admin.js b/web/static/js/admin.js similarity index 100% rename from static/js/admin.js rename to web/static/js/admin.js diff --git a/static/js/index.html b/web/static/js/index.html similarity index 100% rename from static/js/index.html rename to web/static/js/index.html diff --git a/static/robots.txt b/web/static/robots.txt similarity index 100% rename from static/robots.txt rename to web/static/robots.txt diff --git a/static/site.webmanifest b/web/static/site.webmanifest similarity index 100% rename from static/site.webmanifest rename to web/static/site.webmanifest diff --git a/templates/html_admin.tmpl b/web/templates/html_admin.tmpl similarity index 100% rename from templates/html_admin.tmpl rename to web/templates/html_admin.tmpl diff --git a/templates/html_download.tmpl b/web/templates/html_download.tmpl similarity index 100% rename from templates/html_download.tmpl rename to web/templates/html_download.tmpl diff --git a/templates/html_download_password.tmpl b/web/templates/html_download_password.tmpl similarity index 100% rename from templates/html_download_password.tmpl rename to web/templates/html_download_password.tmpl diff --git a/templates/html_error.tmpl b/web/templates/html_error.tmpl similarity index 100% rename from templates/html_error.tmpl rename to web/templates/html_error.tmpl diff --git a/templates/html_footer.tmpl b/web/templates/html_footer.tmpl similarity index 100% rename from templates/html_footer.tmpl rename to web/templates/html_footer.tmpl diff --git a/templates/html_forgotpw.tmpl b/web/templates/html_forgotpw.tmpl similarity index 100% rename from templates/html_forgotpw.tmpl rename to web/templates/html_forgotpw.tmpl diff --git a/templates/html_header.tmpl b/web/templates/html_header.tmpl similarity index 95% rename from templates/html_header.tmpl rename to web/templates/html_header.tmpl index 8cca21f..3cc2d0e 100644 --- a/templates/html_header.tmpl +++ b/web/templates/html_header.tmpl @@ -43,7 +43,7 @@

{{template "app_name"}}

diff --git a/templates/html_index.tmpl b/web/templates/html_index.tmpl similarity index 100% rename from templates/html_index.tmpl rename to web/templates/html_index.tmpl diff --git a/templates/html_login.tmpl b/web/templates/html_login.tmpl similarity index 100% rename from templates/html_login.tmpl rename to web/templates/html_login.tmpl diff --git a/web/templates/string_constants.tmpl b/web/templates/string_constants.tmpl new file mode 100644 index 0000000..5247090 --- /dev/null +++ b/web/templates/string_constants.tmpl @@ -0,0 +1,2 @@ +{{define "app_name"}}Gokapi{{end}} +{{define "version"}}1.1.4-dev{{end}}