Fix linter emptyStringTest rule
by replacing the length check with a string comparison. This rule got introduced with the new GolangCI lint version.
This commit is contained in:
@ -273,7 +273,7 @@ func loadValue(prefix string, value reflect.Value, logEntry *logrus.Entry) {
|
||||
}
|
||||
value.SetBool(boolean)
|
||||
case reflect.Slice:
|
||||
if len(content) > 0 && content[0] == '"' && content[len(content)-1] == '"' {
|
||||
if content != "" && content[0] == '"' && content[len(content)-1] == '"' {
|
||||
content = content[1 : len(content)-1] // remove wrapping quotes
|
||||
}
|
||||
parts := strings.Fields(content)
|
||||
|
Reference in New Issue
Block a user