6
0
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:
Grzegorz Dlugoszewski
2025-08-11 20:43:49 +02:00
parent 8cd27a8f62
commit 7ecef9c85d
7 changed files with 17 additions and 23 deletions

View File

@@ -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)
}
}