如何在GO的Conn中编写响应(类型Response)?

I'm making a webserver in go and I need to give the response form the website to the client. this in the part of my code where i receive the response:

            client := http.Client{}
            resp, err := client.Do(request)
            defer resp.Body.Close()

            if err != nil {
                log.Fatalln(err.Error())
            }

The Do(request) returns a Response type and I need to send this response to the client (conn). I saw a method in conn type the writes data in the connection but it only accept bytes and i couldn't convert the response in bytes. I need to send the body, status and headers,can the conn.Write([]bytes) do that? How can I send this response to my client?

The http.Response has a Write method, which writes the contents of the response to an io.Writer in HTTP/1.X format.

This will write everything in the response verbatim, so you may need to remove/modify headers first to suit your needs.

err = resp.Write(conn)