Showing 9 of 288 total issues
File connection.go
has 621 lines of code (exceeds 500 allowed). Consider refactoring. Open
Open
package management
import (
"encoding/json"
"sort"
UserManager
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
Open
type UserManager struct {
*Management
}
OrganizationManager
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
Open
type OrganizationManager struct {
*Management
}
Method Connection.UnmarshalJSON
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (c *Connection) UnmarshalJSON(b []byte) error {
type connection Connection
type connectionWrapper struct {
*connection
Function New
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func New(domain string, options ...ManagementOption) (*Management, error) {
// Ignore the scheme if it was defined in the domain variable. Then prefix
// with https as its the only scheme supported by the Auth0 API.
if i := strings.Index(domain, "//"); i != -1 {
Method JobManager.ImportUsers
has 7 return statements (exceeds 4 allowed). Open
Open
func (m *JobManager) ImportUsers(j *Job, opts ...RequestOption) error {
var payload bytes.Buffer
mp := multipart.NewWriter(&payload)
Method UserManager.Link
has 6 return statements (exceeds 4 allowed). Open
Open
func (m *UserManager) Link(id string, il *UserIdentityLink, opts ...RequestOption) (uIDs []UserIdentity, err error) {
req, err := m.NewRequest("POST", m.URI("users", id, "identities"), il, opts...)
if err != nil {
return uIDs, err
}
Method Management.Request
has 6 return statements (exceeds 4 allowed). Open
Open
func (m *Management) Request(method, uri string, v interface{}, options ...RequestOption) error {
req, err := m.NewRequest(method, uri, v, options...)
if err != nil {
return err
Method AnomalyManager.CheckIP
has 5 return statements (exceeds 4 allowed). Open
Open
func (m *AnomalyManager) CheckIP(ip string, opts ...RequestOption) (isBlocked bool, err error) {
req, err := m.NewRequest("GET", m.URI("anomaly", "blocks", "ips", ip), nil, opts...)
if err != nil {
return false, err
}