Documentation ¶
Index ¶
- func MatchResponseBody(t TestingT, handler http.Handler, req *http.Request, want []byte)
- func MatchResponseJSON(t TestingT, handler http.Handler, req *http.Request, want any)
- func MatchResponseStatusCode(t TestingT, handler http.Handler, req *http.Request, want int)
- func ReadFile(t TestingT, path string) []byte
- func TempWriter(t TestingT, dir, pattern string) io.WriteCloser
- type TestingT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchResponseBody ¶
MatchResponseStatusCode tests if http.Response returns with expected body
func MatchResponseJSON ¶
MatchResponseStatusCode tests if http.Response returns with expected JSON
func MatchResponseStatusCode ¶
MatchResponseStatusCode tests if http.Response returns with expected status code
func TempWriter ¶
func TempWriter(t TestingT, dir, pattern string) io.WriteCloser
TempWriter return io.WriteCloser backed a temp file
Types ¶
Click to show internal directories.
Click to hide internal directories.