mirror of
https://github.com/grdl/git-get.git
synced 2026-02-08 06:24:18 +00:00
Replace deprecated modules
Replace go-homedir with builtin os.UserHomeDir and pkg/errors with builtin errors
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
package pkg
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
urlpkg "net/url"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var errEmptyURLPath = errors.New("parsed URL path is empty")
|
||||
@@ -32,7 +32,7 @@ func ParseURL(rawURL string, defaultHost string, defaultScheme string) (url *url
|
||||
} else {
|
||||
url, err = urlpkg.Parse(rawURL)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed parsing URL %s", rawURL)
|
||||
return nil, fmt.Errorf("failed parsing URL %s: %w", rawURL, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user