vendor: add github.com/putdotio/go-putio for putio client

This commit is contained in:
Cenk Alti 2019-08-06 15:43:14 +03:00 committed by Nick Craig-Wood
parent 8159658e67
commit 566aa0fca7
15 changed files with 1315 additions and 0 deletions

25
vendor/github.com/putdotio/go-putio/putio/error.go generated vendored Normal file
View file

@ -0,0 +1,25 @@
package putio
import (
"fmt"
"net/http"
)
// ErrorResponse reports the error caused by an API request.
type ErrorResponse struct {
Response *http.Response `json:"-"`
Message string `json:"error_message"`
Type string `json:"error_type"`
}
func (e *ErrorResponse) Error() string {
return fmt.Sprintf(
"Type: %v Message: %q. Original error: %v %v: %v",
e.Type,
e.Message,
e.Response.Request.Method,
e.Response.Request.URL,
e.Response.Status,
)
}