A ReadSeeker for http.Response.Body
import "github.com/jfbus/httprs"
resp, err := http.Get(url)
rs := httprs.NewHttpReadSeeker(resp)
defer rs.Close()
io.ReadFull(rs, buf) // reads the first bytes from the response
rs.Seek(1024, io.SeekStart) // moves the position
io.ReadFull(rs, buf) // does an additional range request and reads the first bytes from the second response
if you use a specific http.Client :
rs := httprs.NewHttpReadSeeker(resp, client)
See https://pkg.go.dev/github.com/jfbus/httprs
MIT - See LICENSE