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 5
5
package externalaccount
6
6
7
7
import (
8
- "bytes"
9
8
"context"
10
9
"crypto/hmac"
11
10
"crypto/sha256"
@@ -148,13 +147,13 @@ func canonicalHeaders(req *http.Request) (string, string) {
148
147
}
149
148
sort .Strings (headers )
150
149
151
- var fullHeaders bytes. Buffer
150
+ var fullHeaders strings. Builder
152
151
for _ , header := range headers {
153
152
headerValue := strings .Join (lowerCaseHeaders [header ], "," )
154
153
fullHeaders .WriteString (header )
155
- fullHeaders .WriteRune (':' )
154
+ fullHeaders .WriteByte (':' )
156
155
fullHeaders .WriteString (headerValue )
157
- fullHeaders .WriteRune ('\n' )
156
+ fullHeaders .WriteByte ('\n' )
158
157
}
159
158
160
159
return strings .Join (headers , ";" ), fullHeaders .String ()
Original file line number Diff line number Diff line change 9
9
package oauth2 // import "golang.org/x/oauth2"
10
10
11
11
import (
12
- "bytes"
13
12
"context"
14
13
"errors"
15
14
"net/http"
@@ -158,7 +157,7 @@ func SetAuthURLParam(key, value string) AuthCodeOption {
158
157
// PKCE), https://www.oauth.com/oauth2-servers/pkce/ and
159
158
// https://www.ietf.org/archive/id/draft-ietf-oauth-v2-1-09.html#name-cross-site-request-forgery (describing both approaches)
160
159
func (c * Config ) AuthCodeURL (state string , opts ... AuthCodeOption ) string {
161
- var buf bytes. Buffer
160
+ var buf strings. Builder
162
161
buf .WriteString (c .Endpoint .AuthURL )
163
162
v := url.Values {
164
163
"response_type" : {"code" },
You can’t perform that action at this time.
0 commit comments