fix: lower-case Graph errors (staticcheck)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
b37caa5a25
commit
1543e992bb
1 file changed
+3
-3
@@ -204,11 +204,11 @@ func (p *Provider) Groups(ctx context.Context) ([]string, error) {
|
|||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
switch {
|
switch {
|
||||||
case err != nil:
|
case err != nil:
|
||||||
return nil, fmt.Errorf("Microsoft Graph: %w", err)
|
return nil, fmt.Errorf("listing groups from Microsoft Graph: %w", err)
|
||||||
case page.Error != nil:
|
case page.Error != nil:
|
||||||
return nil, fmt.Errorf("Microsoft Graph: %s", page.Error.Message)
|
return nil, fmt.Errorf("listing groups from Microsoft Graph: %s", page.Error.Message)
|
||||||
case resp.StatusCode != http.StatusOK:
|
case resp.StatusCode != http.StatusOK:
|
||||||
return nil, fmt.Errorf("Microsoft Graph: %s", resp.Status)
|
return nil, fmt.Errorf("listing groups from Microsoft Graph: %s", resp.Status)
|
||||||
}
|
}
|
||||||
for _, v := range page.Value {
|
for _, v := range page.Value {
|
||||||
if v.Type == "#microsoft.graph.group" && v.Name != "" {
|
if v.Type == "#microsoft.graph.group" && v.Name != "" {
|
||||||
|
|||||||
Reference in new issue
Block a user