mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
Remove github.com/pkg/errors and replace with std library version
This is possible now that we no longer support go1.12 and brings rclone into line with standard practices in the Go world. This also removes errors.New and errors.Errorf from lib/errors and prefers the stdlib errors package over lib/errors.
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
package errors_test
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/rclone/rclone/lib/errors"
|
||||
liberrors "github.com/rclone/rclone/lib/errors"
|
||||
)
|
||||
|
||||
func TestWalk(t *testing.T) {
|
||||
@@ -43,7 +44,7 @@ func TestWalk(t *testing.T) {
|
||||
} {
|
||||
var last error
|
||||
calls := 0
|
||||
errors.Walk(test.err, func(err error) bool {
|
||||
liberrors.Walk(test.err, func(err error) bool {
|
||||
calls++
|
||||
last = err
|
||||
_, stop := err.(stopError)
|
||||
|
||||
Reference in New Issue
Block a user