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"
exported function New should have comment or be unexported Open
Open
func New(packageManager string) *System {
- Exclude checks
exported method System.ProcMap should have comment or be unexported Open
Open
func (s *System) ProcMap() (map[string][]ps.Process, error) {
- Exclude checks
receiver name sys should be consistent with previous receiver name s for System Open
Open
func (sys *System) detectService() {
- Exclude checks
exported type System should have comment or be unexported Open
Open
type System struct {
- Exclude checks
receiver name sys should be consistent with previous receiver name s for System Open
Open
func (sys *System) detectPackage(p string) {
- Exclude checks
exported type Resource should have comment or be unexported Open
Open
type Resource interface {
- Exclude checks
exported method System.Ports should have comment or be unexported Open
Open
func (s *System) Ports() map[string][]GOnetstat.Process {
- Exclude checks