SimonBaeumer/goss

View on GitHub
system/system.go

Summary

Maintainability
A
1 hr
Test Coverage

Avoid deeply nested control flow statements.
Open

    } else if _, err := os.Stat("/etc/debian_version"); err == nil {
        return "debian"
    }
Severity: Major
Found in system/system.go - About 45 mins to fix

    Function DetectDistro has 6 return statements (exceeds 4 allowed).
    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"
    Severity: Major
    Found in system/system.go - About 40 mins to fix

      There are no issues that match your filters.

      Category
      Status