Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e8ac564

Browse filesBrowse files
committed
code opt: replace bytes.Buffer with strings.Builder
1 parent 3067968 commit e8ac564
Copy full SHA for e8ac564

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

โ€Žclient/client.go

Copy file name to clipboardExpand all lines: client/client.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package client
22

33
import (
44
"bufio"
5-
"bytes"
65
"context"
76
"crypto/tls"
87
"errors"
@@ -11,6 +10,7 @@ import (
1110
"net"
1211
"net/url"
1312
"strconv"
13+
"strings"
1414
"sync"
1515
"time"
1616

@@ -495,7 +495,7 @@ func urlencode(data map[string]string) string {
495495
if len(data) == 0 {
496496
return ""
497497
}
498-
var buf bytes.Buffer
498+
var buf strings.Builder
499499
for k, v := range data {
500500
buf.WriteString(url.QueryEscape(k))
501501
buf.WriteByte('=')

0 commit comments

Comments
0ย (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.