Fix errcheck warnings

Signed-off-by: z1cheng <imchench@gmail.com>
This commit is contained in:
z1cheng 2023-06-28 16:10:39 +00:00 committed by k8s-infra-cherrypick-robot
parent 236a41a23b
commit 2bbd69e0d9
27 changed files with 207 additions and 70 deletions

View file

@ -79,7 +79,9 @@ func smugglingRequest(host, addr string, port int) (string, error) {
defer conn.Close()
conn.SetDeadline(time.Now().Add(time.Second * 10))
if err := conn.SetDeadline(time.Now().Add(time.Second * 10)); err != nil {
return "", err
}
_, err = fmt.Fprintf(conn, "GET /echo HTTP/1.1\r\nHost: %v\r\nContent-Length: 56\r\n\r\nGET /_hidden/index.html HTTP/1.1\r\nHost: notlocalhost\r\n\r\n", host)
if err != nil {