removed unused options struct
This commit is contained in:
parent
f7df737c45
commit
16da7d9e1a
|
@ -80,11 +80,6 @@ func NewFileFromMultipart(mh *multipart.FileHeader) (*File, error) {
|
||||||
return f, nil
|
return f, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type UrlOptions struct {
|
|
||||||
Context context.Context
|
|
||||||
Url string
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewFileFromUrl creates a new File from the provided url by
|
// NewFileFromUrl creates a new File from the provided url by
|
||||||
// downloading the resource and load it as BytesReader.
|
// downloading the resource and load it as BytesReader.
|
||||||
//
|
//
|
||||||
|
|
|
@ -114,10 +114,6 @@ func TestNewFileFromMultipart(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNewFileFromUrlTimeout(t *testing.T) {
|
func TestNewFileFromUrlTimeout(t *testing.T) {
|
||||||
// timeout
|
|
||||||
// invalid response
|
|
||||||
// valid response
|
|
||||||
|
|
||||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
if r.URL.Path == "/error" {
|
if r.URL.Path == "/error" {
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
|
|
Loading…
Reference in New Issue