From 8b865169bd36c789597e3dc50b5f87f166c2a56f Mon Sep 17 00:00:00 2001 From: Rui Yang Date: Wed, 17 Nov 2021 17:42:55 -0500 Subject: [PATCH] fix minor compilation error for group claim us 'os' insteak of 'io/ioutil' Signed-off-by: Rui Yang --- connector/oauth/oauth.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/connector/oauth/oauth.go b/connector/oauth/oauth.go index e3ecd55b..55527670 100644 --- a/connector/oauth/oauth.go +++ b/connector/oauth/oauth.go @@ -8,9 +8,9 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" "net" "net/http" + "os" "strings" "time" @@ -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) } @@ -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{}{} } } }