Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTempZip ¶
CreateTempZip creates a zip file that contains a file
func GenerateInvalidURL ¶
func GenerateInvalidURL() string
GenerateInvalidURL provides random invalid URL
Types ¶
type ErrorWriter ¶
type ErrorWriter struct {
// contains filtered or unexported fields
}
ErrorWriter helps error handling while writing.
func NewErrorWriter ¶
func NewErrorWriter(w io.Writer, err error) ErrorWriter
NewErrorWriter creates a ErrorWriter instance.
func (ErrorWriter) Err ¶
func (w ErrorWriter) Err() error
Err returns error if any error occurred in Write method.
type FailBodyHTTPClient ¶
type FailBodyHTTPClient struct {
Err error
}
FailBodyHTTPClient helps simulating failure on reading response body.
type TestServerHandler ¶
TestServerHandler is a handler that returns specified contents for tests
func (TestServerHandler) ServeHTTP ¶
func (h TestServerHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)
ServeHTTP returns specified contents in TestServerHandler
Click to show internal directories.
Click to hide internal directories.