File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 55package externalaccount
66
77import (
8- "bytes"
98 "context"
109 "crypto/hmac"
1110 "crypto/sha256"
@@ -148,13 +147,13 @@ func canonicalHeaders(req *http.Request) (string, string) {
148147 }
149148 sort .Strings (headers )
150149
151- var fullHeaders bytes. Buffer
150+ var fullHeaders strings. Builder
152151 for _ , header := range headers {
153152 headerValue := strings .Join (lowerCaseHeaders [header ], "," )
154153 fullHeaders .WriteString (header )
155- fullHeaders .WriteRune (':' )
154+ fullHeaders .WriteByte (':' )
156155 fullHeaders .WriteString (headerValue )
157- fullHeaders .WriteRune ('\n' )
156+ fullHeaders .WriteByte ('\n' )
158157 }
159158
160159 return strings .Join (headers , ";" ), fullHeaders .String ()
Original file line number Diff line number Diff line change 99package oauth2 // import "golang.org/x/oauth2"
1010
1111import (
12- "bytes"
1312 "context"
1413 "errors"
1514 "net/http"
@@ -158,7 +157,7 @@ func SetAuthURLParam(key, value string) AuthCodeOption {
158157// PKCE), https://www.oauth.com/oauth2-servers/pkce/ and
159158// https://www.ietf.org/archive/id/draft-ietf-oauth-v2-1-09.html#name-cross-site-request-forgery (describing both approaches)
160159func (c * Config ) AuthCodeURL (state string , opts ... AuthCodeOption ) string {
161- var buf bytes. Buffer
160+ var buf strings. Builder
162161 buf .WriteString (c .Endpoint .AuthURL )
163162 v := url.Values {
164163 "response_type" : {"code" },
You can’t perform that action at this time.
0 commit comments