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:
@@ -2,8 +2,8 @@ package settier
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rclone/rclone/cmd"
|
||||
"github.com/rclone/rclone/fs/operations"
|
||||
"github.com/spf13/cobra"
|
||||
@@ -47,7 +47,7 @@ Or just provide remote directory and all files in directory will be tiered
|
||||
cmd.Run(false, false, command, func() error {
|
||||
isSupported := fsrc.Features().SetTier
|
||||
if !isSupported {
|
||||
return errors.Errorf("Remote %s does not support settier", fsrc.Name())
|
||||
return fmt.Errorf("Remote %s does not support settier", fsrc.Name())
|
||||
}
|
||||
|
||||
return operations.SetTier(context.Background(), fsrc, tier)
|
||||
|
||||
Reference in New Issue
Block a user