Remove nil check (#493)

As the length of a nil slice is defined as 0, the nil check is
redundand. (suggested by golanci-lint/gosimple)
pull/489/head^2
Sebastian Ehmann 5 years ago committed by Roberto Rojas
parent 09fb3c4fe4
commit 56fa231376

@ -244,8 +244,8 @@ func executeJSONPath(path string, jsonInterface interface{}) (string, error) {
}
func allElementsValid(s, t []string) bool {
sourceEmpty := s == nil || len(s) == 0
targetEmpty := t == nil || len(t) == 0
sourceEmpty := len(s) == 0
targetEmpty := len(t) == 0
if sourceEmpty && targetEmpty {
return true

Loading…
Cancel
Save