Print go version at startup
This commit is contained in:
parent
c13fb48352
commit
55dca92b79
3 changed files with 7 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,6 +1,7 @@
|
||||||
vendor
|
vendor
|
||||||
bin
|
bin
|
||||||
tmp
|
tmp
|
||||||
|
|
||||||
.vscode
|
.vscode
|
||||||
report.xml
|
report.xml
|
||||||
debug
|
debug
|
||||||
|
|
|
@ -6,6 +6,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -190,6 +191,7 @@ func (c EnvConfig) show() {
|
||||||
log.Println("------------------------------------")
|
log.Println("------------------------------------")
|
||||||
log.Println("- PI-Hole exporter configuration -")
|
log.Println("- PI-Hole exporter configuration -")
|
||||||
log.Println("------------------------------------")
|
log.Println("------------------------------------")
|
||||||
|
log.Printf("Go version: %s", runtime.Version())
|
||||||
for i := 0; i < val.NumField(); i++ {
|
for i := 0; i < val.NumField(); i++ {
|
||||||
valueField := val.Field(i)
|
valueField := val.Field(i)
|
||||||
typeField := val.Type().Field(i)
|
typeField := val.Type().Field(i)
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,6 +1,6 @@
|
||||||
module github.com/eko/pihole-exporter
|
module github.com/eko/pihole-exporter
|
||||||
|
|
||||||
go 1.17
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/heetch/confita v0.10.0
|
github.com/heetch/confita v0.10.0
|
||||||
|
|
Loading…
Reference in a new issue