1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2024-11-25 09:28:16 +00:00

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)
This commit is contained in:
Sebastian Ehmann 2019-11-06 02:23:31 +01:00 committed by Roberto Rojas
parent 09fb3c4fe4
commit 56fa231376

View File

@ -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