Replace github.com/pkg/errors with stdlib errors/fmt (#2400)

This commit is contained in:
James Raspass
2024-03-16 08:10:49 +00:00
committed by GitHub
parent 05b76852bd
commit 5d887cbd41
4 changed files with 4 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ package main
import (
"context"
"errors"
"fmt"
"os"
"path/filepath"
@@ -20,7 +21,6 @@ import (
gosrc "github.com/Morganamilo/go-srcinfo"
"github.com/leonelquinteros/gotext"
"github.com/pkg/errors"
)
var ErrNoBuildFiles = errors.New(gotext.Get("cannot find PKGBUILD and .SRCINFO in directory"))
@@ -74,7 +74,7 @@ func installLocalPKGBUILD(
pkgbuild, err := gosrc.ParseFile(filepath.Join(targetDir, ".SRCINFO"))
if err != nil {
return errors.Wrap(err, gotext.Get("failed to parse .SRCINFO"))
return fmt.Errorf("%s: %w", gotext.Get("failed to parse .SRCINFO"), err)
}
srcInfos[targetDir] = pkgbuild