This commit is contained in:
parent
be95054f69
commit
f84f300488
3 changed files with 23 additions and 1 deletions
|
@ -15,6 +15,8 @@ builds:
|
||||||
#- darwin
|
#- darwin
|
||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
|
ldflags:
|
||||||
|
- -X main.version={{ .Version }}
|
||||||
archives:
|
archives:
|
||||||
- replacements:
|
- replacements:
|
||||||
darwin: Darwin
|
darwin: Darwin
|
||||||
|
|
6
main.go
6
main.go
|
@ -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))
|
||||||
})
|
})
|
||||||
|
|
|
@ -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>
|
Loading…
Reference in a new issue