mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
backend: Don't Wrap errors from url.Parse
The messages from url.Error.Error already start with the word "parse".
This commit is contained in:
parent
b150dd0235
commit
d9002f050e
@ -34,9 +34,8 @@ func ParseConfig(s string) (interface{}, error) {
|
||||
s = prepareURL(s)
|
||||
|
||||
u, err := url.Parse(s)
|
||||
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "url.Parse")
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
|
||||
cfg := NewConfig()
|
||||
|
@ -52,7 +52,7 @@ func ParseConfig(s string) (interface{}, error) {
|
||||
// bucket name and prefix
|
||||
url, err := url.Parse(s[3:])
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "url.Parse")
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
|
||||
if url.Path == "" {
|
||||
|
@ -42,7 +42,7 @@ func ParseConfig(s string) (interface{}, error) {
|
||||
// parse the "sftp://user@host/path" url format
|
||||
url, err := url.Parse(s)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "url.Parse")
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
if url.User != nil {
|
||||
user = url.User.Username()
|
||||
|
Loading…
Reference in New Issue
Block a user