Skip to content

Commit d03231d

Browse files
AlexanderYastrebovgopherbot
authored andcommitted
doc/go1.20: fix http.ResponseController example
Fixes #57162 Change-Id: I190810d702e503822265b12c56db69ec1093233c GitHub-Last-Rev: e8b259d GitHub-Pull-Request: #57385 Reviewed-on: https://go-review.googlesource.com/c/go/+/458275 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Matt Layher <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
1 parent cdc73f0 commit d03231d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/go1.20.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ <h3 id="http_responsecontroller">HTTP ResponseController</h3>
458458
<pre>
459459
func RequestHandler(w ResponseWriter, r *Request) {
460460
rc := http.NewResponseController(w)
461-
rc.SetWriteDeadline(0) // disable Server.WriteTimeout when sending a large response
461+
rc.SetWriteDeadline(time.Time{}) // disable Server.WriteTimeout when sending a large response
462462
io.Copy(w, bigData)
463463
}
464464
</pre>

0 commit comments

Comments
 (0)