system/system.go
Avoid deeply nested control flow statements. Open
Open
} else if _, err := os.Stat("/etc/debian_version"); err == nil {
return "debian"
}
Function DetectDistro
has 6 return statements (exceeds 4 allowed). Open
Open
func DetectDistro() string {
if b, e := ioutil.ReadFile("/etc/lsb-release"); e == nil && bytes.Contains(b, []byte("Ubuntu")) {
return "ubuntu"
} else if isRedhat() {
return "redhat"