{"modulePath":"github.com/hellofresh/github-cli","version":"v0.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package test\n\n## Types\n\n```go\ntype Handler interface {\n\tHandle(method, path string, header *http.Header, body []byte) Response\n}\n```\nHandler is the interface used by httpmock instead of http.Handler so that it can be mocked very easily.\n\n```go\ntype MockHandler struct {\n\tmock.Mock\n}\n```\nMockHandler is a test.Handler that uses github.com/stretchr/testify/mock.\n\n```go\nfunc (m *MockHandler) Handle(method, path string, header *http.Header, body []byte) Response\n```\nHandle makes this implement the Handler interface.\n\n```go\ntype Response struct {\n\t// The HTTP status code to write (default: 200)\n\tStatus int\n\t// Headers to add to the response\n\tHeader http.Header\n\t// The response body to write (default: no body)\n\tBody []byte\n}\n```\nResponse holds the response a handler wants to return to the client.\n\n```go\ntype Server struct {\n\t// contains filtered or unexported fields\n}\n```\nServer listens for requests and interprets them into calls to your Handler.\n\n```go\nfunc NewServer(handler Handler) *Server\n```\nNewServer constructs a new server and starts it (compare to httptest.NewServer). It needs to be Closed()ed.\n\n```go\nfunc NewUnstartedServer(handler Handler) *Server\n```\nNewUnstartedServer constructs a new server but doesn't start it (compare to httptest.NewUnstartedServer).\n\n```go\nfunc (s *Server) Close()\n```\nClose shuts down a started server.\n\n```go\nfunc (s *Server) Start()\n```\nStart starts an unstarted server.\n\n```go\nfunc (s *Server) URL() string\n```\nURL is the URL for the local test server, i.e. the value of httptest.Server.URL\n\n","path":"github.com/hellofresh/github-cli/pkg/test","name":"test","synopsis":"","isRedistributable":true}
