netdata/netdata

View on GitHub
src/go/collectors/go.d.plugin/modules/consul/collect.go

Summary

Maintainability
A
1 hr
Test Coverage

Method Consul.collect has 6 return statements (exceeds 4 allowed).
Open

func (c *Consul) collect() (map[string]int64, error) {
    if c.cfg == nil {
        if err := c.collectConfiguration(); err != nil {
            return nil, err
        }
Severity: Major
Found in src/go/collectors/go.d.plugin/modules/consul/collect.go - About 40 mins to fix

    Method Consul.doOKDecode has 5 return statements (exceeds 4 allowed).
    Open

    func (c *Consul) doOKDecode(urlPath string, in interface{}, statusCodes ...int) error {
        req, err := web.NewHTTPRequest(c.Request.Copy())
        if err != nil {
            return fmt.Errorf("error on creating request: %v", err)
        }
    Severity: Major
    Found in src/go/collectors/go.d.plugin/modules/consul/collect.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status