Add gocritic

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
This commit is contained in:
m.nabokikh
2020-10-18 01:54:27 +04:00
parent 4d63e9cd68
commit 1d83e4749d
17 changed files with 99 additions and 97 deletions

View File

@@ -334,11 +334,12 @@ func (c *githubConnector) Refresh(ctx context.Context, s connector.Scopes, ident
// getGroups retrieves GitHub orgs and teams a user is in, if any.
func (c *githubConnector) getGroups(ctx context.Context, client *http.Client, groupScope bool, userLogin string) ([]string, error) {
if len(c.orgs) > 0 {
switch {
case len(c.orgs) > 0:
return c.groupsForOrgs(ctx, client, userLogin)
} else if c.org != "" {
case c.org != "":
return c.teamsForOrg(ctx, client, c.org)
} else if groupScope && c.loadAllGroups {
case groupScope && c.loadAllGroups:
return c.userGroups(ctx, client)
}
return nil, nil