Skip to content

Commit

Permalink
Replace github.com/pkg/errors with stdlib errors/fmt (#2400)
Browse files Browse the repository at this point in the history
  • Loading branch information
JRaspass authored Mar 16, 2024
1 parent 05b7685 commit 5d887cb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ require (
github.com/itchyny/timefmt-go v0.1.5 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/ohler55/ojg v1.21.4 // indirect
github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
github.com/ohler55/ojg v1.21.4 h1:2iWyz/xExx0XySVIxR9kWFxIdsLNrpWLrKuAcs5aOZU=
github.com/ohler55/ojg v1.21.4/go.mod h1:gQhDVpQLqrmnd2eqGAvJtn+NfKoYJbe/A4Sj3/Vro4o=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
4 changes: 2 additions & 2 deletions local_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package main

import (
"context"
"errors"
"fmt"
"os"
"path/filepath"
Expand All @@ -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"))
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/graph/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"errors"
"fmt"
"os"
"path/filepath"
Expand All @@ -15,7 +16,6 @@ import (

"github.com/Jguer/aur/metadata"
"github.com/leonelquinteros/gotext"
"github.com/pkg/errors"
)

func handleCmd(logger *text.Logger) error {
Expand Down Expand Up @@ -43,7 +43,7 @@ func handleCmd(logger *text.Logger) error {
metadata.WithCacheFilePath(
filepath.Join(cfg.BuildDir, "aur.json")))
if err != nil {
return errors.Wrap(err, gotext.Get("failed to retrieve aur Cache"))
return fmt.Errorf("%s: %w", gotext.Get("failed to retrieve aur Cache"), err)
}

grapher := dep.NewGrapher(dbExecutor, aurCache, true, settings.NoConfirm,
Expand Down

0 comments on commit 5d887cb

Please sign in to comment.