Skip to content

Commit

Permalink
fix minor compilation error for group claim
Browse files Browse the repository at this point in the history
us 'os' insteak of 'io/ioutil'

Signed-off-by: Rui Yang <[email protected]>
  • Loading branch information
Rui Yang committed Nov 17, 2021
1 parent 7c80e44 commit 8b86516
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions connector/oauth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"strings"
"time"

Expand Down Expand Up @@ -122,7 +122,7 @@ func newHTTPClient(rootCAs []string, insecureSkipVerify bool) (*http.Client, err

tlsConfig := tls.Config{RootCAs: pool, InsecureSkipVerify: insecureSkipVerify}
for _, rootCA := range rootCAs {
rootCABytes, err := ioutil.ReadFile(rootCA)
rootCABytes, err := os.ReadFile(rootCA)
if err != nil {
return nil, fmt.Errorf("failed to read root-ca: %v", err)
}
Expand Down Expand Up @@ -249,7 +249,7 @@ func (c *oauthConnector) addGroupsFromMap(groups map[string]struct{}, result map
}
if groupMap, ok := group.(map[string]interface{}); ok {
if groupName, ok := groupMap["name"].(string); ok {
groups[groupName] = true
groups[groupName] = struct{}{}
}
}
}
Expand Down

0 comments on commit 8b86516

Please sign in to comment.