Skip to content

Commit 648b9d9

Browse files
committed
sprintf
1 parent 6d8290b commit 648b9d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net/url/url.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type Error struct {
2626
}
2727

2828
func (e *Error) Unwrap() error { return e.Err }
29-
func (e *Error) Error() string { return e.Op + " " + strconv.Quote(e.URL) + ": " + e.Err.Error() }
29+
func (e *Error) Error() string { return fmt.Sprintf("%s %q: %s", e.Op, e.URL, e.Err) }
3030

3131
func (e *Error) Timeout() bool {
3232
t, ok := e.Err.(interface {

0 commit comments

Comments
 (0)