kubesphere / kubeeye

KubeEye aims to find various problems on Kubernetes, such as application misconfiguration, unhealthy cluster components and node problems.
https://kubesphere.io
Apache License 2.0
810 stars 126 forks source link

bug: parseSysctlVal 代码错误? #328

Open hanqingwu opened 5 months ago

hanqingwu commented 5 months ago

pkg/inspect/sysctl_inspect.go

 func parseSysctlVal(val []string) string {
-       if len(val) == 0 && val == nil {
+       if len(val) == 0 || val == nil {
                return ""
        }
        return val[0]

此处是否应该修订下, 如果val 是空数组,应返回 “”