From 56fa231376c401b988de3c9748c1e9e9cfea81e5 Mon Sep 17 00:00:00 2001 From: Sebastian Ehmann Date: Wed, 6 Nov 2019 02:23:31 +0100 Subject: [PATCH] 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) --- check/test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check/test.go b/check/test.go index 4f3cb79..b947fe5 100644 --- a/check/test.go +++ b/check/test.go @@ -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