Skip to content

Instantly share code, notes, and snippets.

@jupemara
Created August 31, 2021 19:29
Show Gist options
  • Save jupemara/69556eaca45ea0e1b0eb2bd349d73069 to your computer and use it in GitHub Desktop.
Save jupemara/69556eaca45ea0e1b0eb2bd349d73069 to your computer and use it in GitHub Desktop.
dummy http.Response
package httputil
import "http"
func NewDummyResponse() *http.Response {
return &http.Response{
Body: io.NopCloser(strings.NewReader("")),
Header: make(http.Header),
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment