firehol/netdata

View on GitHub
src/go/plugin/go.d/modules/ceph/auth.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method Ceph.authCheck has 7 return statements (exceeds 4 allowed).
Open

func (c *Ceph) authCheck() (bool, error) {
    // https://docs.ceph.com/en/reef/mgr/ceph_api/#post--api-auth-check
    if c.token == "" {
        return false, nil
    }
Severity: Major
Found in src/go/plugin/go.d/modules/ceph/auth.go - About 45 mins to fix

    Method Ceph.authLogin has 7 return statements (exceeds 4 allowed).
    Open

    func (c *Ceph) authLogin() (string, error) {
        // https://docs.ceph.com/en/reef/mgr/ceph_api/#post--api-auth
    
        req, err := func() (*http.Request, error) {
            var credentials = struct {
    Severity: Major
    Found in src/go/plugin/go.d/modules/ceph/auth.go - About 45 mins to fix

      Method Ceph.authLogout has 5 return statements (exceeds 4 allowed).
      Open

      func (c *Ceph) authLogout() error {
          // https://docs.ceph.com/en/reef/mgr/ceph_api/#post--api-auth-logout
      
          if c.token == "" {
              return nil
      Severity: Major
      Found in src/go/plugin/go.d/modules/ceph/auth.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status