github.com/MerlinKodo/quic-go@v0.39.2/integrationtests/self/go120_test.go (about) 1 //go:build go1.20 2 3 package self_test 4 5 import ( 6 "net/http" 7 "time" 8 ) 9 10 const go120 = true 11 12 func setReadDeadline(w http.ResponseWriter, deadline time.Time) error { 13 rc := http.NewResponseController(w) 14 15 return rc.SetReadDeadline(deadline) 16 } 17 18 func setWriteDeadline(w http.ResponseWriter, deadline time.Time) error { 19 rc := http.NewResponseController(w) 20 21 return rc.SetWriteDeadline(deadline) 22 }