Skip to content

Commit a5144ac

Browse files
committed
use less reflection
1 parent f051062 commit a5144ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/param/param.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bufio"
55
"fmt"
66
"io"
7+
"strconv"
78
"strings"
89
)
910

@@ -17,9 +18,9 @@ type Param struct {
1718
// String returns the formatted parameter
1819
func (p Param) String() string {
1920
if p.Quote {
20-
return fmt.Sprintf("%s=%q", p.Key, p.Value)
21+
return p.Key + "=" + strconv.Quote(p.Value)
2122
}
22-
return fmt.Sprintf("%s=%s", p.Key, p.Value)
23+
return p.Key + "=" + p.Value
2324
}
2425

2526
// Format formats the parameters to be included in the header

0 commit comments

Comments
 (0)