Added Go runtime version to the layout footer
This commit is contained in:
parent
e3e4e24e56
commit
1e87466ccb
2
Makefile
2
Makefile
@ -4,7 +4,7 @@ VERSION=`git describe --tags`
|
|||||||
.PHONY: build
|
.PHONY: build
|
||||||
## build: Compile the packages.
|
## build: Compile the packages.
|
||||||
build:
|
build:
|
||||||
@go build -o $(NAME) -ldflags "-X git.metaunix.net/bitgoblin/blt/app.Version=$(VERSION)"
|
@go build -o $(NAME) -ldflags "-X git.metaunix.net/bitgoblin/blt/app.AppVersion=$(VERSION)"
|
||||||
|
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
## run: Build and Run in development mode.
|
## run: Build and Run in development mode.
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
var (
|
import (
|
||||||
Version string = "N/a"
|
"runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
AppVersion string = "N/a"
|
||||||
|
RuntimeVersion string = runtime.Version
|
||||||
)
|
)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<!-- footer -->
|
<!-- footer -->
|
||||||
<nav id="main-footer">
|
<nav id="main-footer">
|
||||||
<p>BLT version {{ .app_version }}</p>
|
<p>BLT version {{ .app_version }} | Built with Go {{ .runtime_version }}</p>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -7,5 +7,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func CustomVars(data template.Data) {
|
func CustomVars(data template.Data) {
|
||||||
data["app_version"] = app.Version
|
data["app_version"] = app.AppVersion
|
||||||
|
data["runtime_version"] = app.RuntimeVersion
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user