Moving from govendor to dep, updated dependencies (#48)
* Moving from govendor to dep. * Making the pull request template more friendly. * Fixing akward space in PR template. * goimports run on whole project using ` goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./gen-go/*")` source of command: https://gist.github.com/bgentry/fd1ffef7dbde01857f66
This commit is contained in:
parent
9631aa3aab
commit
8d445c1c77
2186 changed files with 400410 additions and 352 deletions
2
vendor/github.com/stretchr/testify/http/doc.go
generated
vendored
Normal file
2
vendor/github.com/stretchr/testify/http/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
// Package http DEPRECATED USE net/http/httptest
|
||||
package http
|
49
vendor/github.com/stretchr/testify/http/test_response_writer.go
generated
vendored
Normal file
49
vendor/github.com/stretchr/testify/http/test_response_writer.go
generated
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
package http
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// TestResponseWriter DEPRECATED: We recommend you use http://golang.org/pkg/net/http/httptest instead.
|
||||
type TestResponseWriter struct {
|
||||
|
||||
// StatusCode is the last int written by the call to WriteHeader(int)
|
||||
StatusCode int
|
||||
|
||||
// Output is a string containing the written bytes using the Write([]byte) func.
|
||||
Output string
|
||||
|
||||
// header is the internal storage of the http.Header object
|
||||
header http.Header
|
||||
}
|
||||
|
||||
// Header DEPRECATED: We recommend you use http://golang.org/pkg/net/http/httptest instead.
|
||||
func (rw *TestResponseWriter) Header() http.Header {
|
||||
|
||||
if rw.header == nil {
|
||||
rw.header = make(http.Header)
|
||||
}
|
||||
|
||||
return rw.header
|
||||
}
|
||||
|
||||
// Write DEPRECATED: We recommend you use http://golang.org/pkg/net/http/httptest instead.
|
||||
func (rw *TestResponseWriter) Write(bytes []byte) (int, error) {
|
||||
|
||||
// assume 200 success if no header has been set
|
||||
if rw.StatusCode == 0 {
|
||||
rw.WriteHeader(200)
|
||||
}
|
||||
|
||||
// add these bytes to the output string
|
||||
rw.Output = rw.Output + string(bytes)
|
||||
|
||||
// return normal values
|
||||
return 0, nil
|
||||
|
||||
}
|
||||
|
||||
// WriteHeader DEPRECATED: We recommend you use http://golang.org/pkg/net/http/httptest instead.
|
||||
func (rw *TestResponseWriter) WriteHeader(i int) {
|
||||
rw.StatusCode = i
|
||||
}
|
17
vendor/github.com/stretchr/testify/http/test_round_tripper.go
generated
vendored
Normal file
17
vendor/github.com/stretchr/testify/http/test_round_tripper.go
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
package http
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/mock"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// TestRoundTripper DEPRECATED USE net/http/httptest
|
||||
type TestRoundTripper struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// RoundTrip DEPRECATED USE net/http/httptest
|
||||
func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
args := t.Called(req)
|
||||
return args.Get(0).(*http.Response), args.Error(1)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue