Merge pull request #152 from Galorhallen/master
Minor chores and add pre-commit hooks
This commit is contained in:
commit
84463e2815
3 changed files with 24 additions and 3 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
|
||||||
|
|
18
.pre-commit-config.yaml
Normal file
18
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/dnephin/pre-commit-golang
|
||||||
|
rev: v0.5.1
|
||||||
|
hooks:
|
||||||
|
- id: go-fmt
|
||||||
|
- id: go-vet
|
||||||
|
- id: validate-toml
|
||||||
|
- id: no-go-testing
|
||||||
|
- id: go-unit-tests
|
||||||
|
- id: go-build
|
||||||
|
- id: go-mod-tidy
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks.git
|
||||||
|
rev: v4.3.0
|
||||||
|
hooks:
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: mixed-line-ending
|
||||||
|
- id: check-merge-conflict
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -191,6 +192,7 @@ func (c EnvConfig) show() {
|
||||||
log.Info("------------------------------------")
|
log.Info("------------------------------------")
|
||||||
log.Info("- PI-Hole exporter configuration -")
|
log.Info("- PI-Hole exporter configuration -")
|
||||||
log.Info("------------------------------------")
|
log.Info("------------------------------------")
|
||||||
|
log.Info("Go version: ", 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)
|
||||||
|
|
Loading…
Reference in a new issue