simplesurance / baur

An incremental task runner for mono repositories.
GNU General Public License v2.0
362 stars 11 forks source link

Remove use of pkg/errors #211

Closed fho closed 4 years ago

fho commented 4 years ago

Support to wrap errors was used in Go. In the master branch most packages already were changed to use Golangs error wrapping technique instead of pkg/errors.

Replace all remaining usages of pkg/errors with using Golangs errors wrapper technique (fmt.Errorf("msg: %w ",err)).

u5surf commented 4 years ago

@fho Hi, Can I work on this issue? I’m sure where should I fix.

~/baur grep -rn "pkg/error" --include '*.go' . | grep -v vendor
./internal/upload/filecopy/filecopy.go:8:"github.com/pkg/errors"
./internal/upload/docker/docker.go:9:"github.com/pkg/errors"
./internal/version/version.go:7:"github.com/pkg/errors"
./internal/vcs/git/git.go:13:"github.com/pkg/errors"
./internal/fs/fileglob.go:8:"github.com/pkg/errors"
./internal/digest/digest.go:8:"github.com/pkg/errors"
./internal/digest/sha384/sha384.go:11:"github.com/pkg/errors"
./repository.go:7:"github.com/pkg/errors"
./app.go:7:"github.com/pkg/errors"
fho commented 4 years ago

@u5surf yes, would be great if you can implement it.

All occurrences needs to be changed. There should be no github.com/pkg/errors import in the master branch anymore and the package should be removed from go.mod and the vendor directory