mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2024-11-29 03:18:27 +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:
parent
09fb3c4fe4
commit
56fa231376
@ -244,8 +244,8 @@ func executeJSONPath(path string, jsonInterface interface{}) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func allElementsValid(s, t []string) bool {
|
func allElementsValid(s, t []string) bool {
|
||||||
sourceEmpty := s == nil || len(s) == 0
|
sourceEmpty := len(s) == 0
|
||||||
targetEmpty := t == nil || len(t) == 0
|
targetEmpty := len(t) == 0
|
||||||
|
|
||||||
if sourceEmpty && targetEmpty {
|
if sourceEmpty && targetEmpty {
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user