I want to send my response data to to client with "Transfer-Encoding:trunked". But I do not find the way to do it with Golang. Is there any example for this?
The net/http server does not allow the application to control the transfer encoding.
The net/http server automatically uses chunked encoding when the application does not set the Content-Length response header and the connection can be reused (http/1 client requested keep-alive or http/1.1 client did not request connection close).