Version
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kekskurse 2021-11-25 02:35:17 +01:00
parent be95054f69
commit f84f300488
Signed by: kekskurse
GPG key ID: 728ACCB59341E7E4
3 changed files with 23 additions and 1 deletions

View file

@ -15,6 +15,8 @@ builds:
#- darwin #- darwin
goarch: goarch:
- amd64 - amd64
ldflags:
- -X main.version={{ .Version }}
archives: archives:
- replacements: - replacements:
darwin: Darwin darwin: Darwin

View file

@ -13,6 +13,10 @@ import (
//go:embed template/index.html //go:embed template/index.html
var s string var s string
var (
version = "development"
)
var checkList []checks.Check var checkList []checks.Check
func init() { func init() {
@ -34,7 +38,7 @@ func main() {
panic(err) panic(err)
} }
t.Execute(writer, map[string]interface{}{"checks":res}) t.Execute(writer, map[string]interface{}{"checks":res, "version": version})
//writer.Write([]byte(s)) //writer.Write([]byte(s))
}) })

View file

@ -114,5 +114,21 @@
</div> </div>
</div> </div>
</div> </div>
<div class="container">
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
<div class="col-md-4 d-flex align-items-center">
<a href="/" class="mb-3 me-2 mb-md-0 text-muted text-decoration-none lh-1">
<svg class="bi" width="30" height="24"><use xlink:href="#bootstrap"/></svg>
</a>
<span class="text-muted">Version: {{ .version }}</span>
</div>
<ul class="nav col-md-4 justify-content-end list-unstyled d-flex">
<li><a href="https://git.keks.cloud/kekskurse/http-server-status">Git/Source Code</a></li>
</ul>
</footer>
</div>
</body> </body>
</html> </html>