Lint: Fix daedcode / error message
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
287a38aa02
commit
084c849fbb
3 changed files with 2 additions and 3 deletions
|
@ -96,7 +96,7 @@ func loadConfig(filename string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if configVersion.ConfigVersion < expectedMinConfigVersion {
|
if configVersion.ConfigVersion < expectedMinConfigVersion {
|
||||||
return errors.Errorf("config version too old: %d < %d - Please have a look at the documentation!", configVersion.ConfigVersion, expectedMinConfigVersion)
|
return errors.Errorf("config version too old: %d < %d - Please have a look at the documentation", configVersion.ConfigVersion, expectedMinConfigVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = parseConfigFromYAML(filename, tmpConfig, true); err != nil {
|
if err = parseConfigFromYAML(filename, tmpConfig, true); err != nil {
|
||||||
|
|
|
@ -2,6 +2,5 @@ package main
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ptrBoolFalse = func(v bool) *bool { return &v }(false)
|
ptrBoolFalse = func(v bool) *bool { return &v }(false)
|
||||||
ptrIntZero = func(v int64) *int64 { return &v }(0)
|
|
||||||
ptrStringEmpty = func(v string) *string { return &v }("")
|
ptrStringEmpty = func(v string) *string { return &v }("")
|
||||||
)
|
)
|
||||||
|
|
|
@ -80,7 +80,7 @@ func TestFieldCollectionNilDataGet(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestFieldCollectionIntToString(t *testing.T) {
|
func TestFieldCollectionIntToString(t *testing.T) {
|
||||||
var val int = 123
|
val := 123
|
||||||
fc := FieldCollectionFromData(map[string]interface{}{"test": val})
|
fc := FieldCollectionFromData(map[string]interface{}{"test": val})
|
||||||
|
|
||||||
if !fc.CanString("test") {
|
if !fc.CanString("test") {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue