Move software version handling to a new package

This commit is contained in:
2021-10-04 12:20:16 +10:30
parent 1812486b19
commit 3a65a60fcb
5 changed files with 40 additions and 30 deletions

View File

@@ -16,6 +16,7 @@ import (
"github.com/tardisx/discord-auto-upload/config"
daulog "github.com/tardisx/discord-auto-upload/log"
"github.com/tardisx/discord-auto-upload/uploads"
"github.com/tardisx/discord-auto-upload/version"
)
// DAUWebServer - stuff for the web server
@@ -67,7 +68,7 @@ func getStatic(w http.ResponseWriter, r *http.Request) {
}
b.Body = string(data)
b.Path = string(sanitized_path)
b.Version = config.CurrentVersion
b.Version = version.CurrentVersion
t.Execute(w, b)
return
}