summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorChengenH <hce19970702@gmail.com>2024-04-24 16:21:34 +0800
committerChengenH <hce19970702@gmail.com>2024-04-24 16:21:34 +0800
commitdd6bfa1680f900b9242de3533196079c20b363de (patch)
tree8d08ed9ea507a8d542e8b14bb0fb9dcaee437d34 /pkg/commands
parent0a5e9b2d60ae434331045a6a2a99e7eae5f5aa6b (diff)
chore: use errors.New to replace fmt.Errorf with no parameters.
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/oscommands/copy.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/commands/oscommands/copy.go b/pkg/commands/oscommands/copy.go
index aab460e47..c6d83e23b 100644
--- a/pkg/commands/oscommands/copy.go
+++ b/pkg/commands/oscommands/copy.go
@@ -1,7 +1,7 @@
package oscommands
import (
- "fmt"
+ "errors"
"io"
"os"
"path/filepath"
@@ -86,7 +86,7 @@ func CopyDir(src string, dst string) (err error) {
return err
}
if !si.IsDir() {
- return fmt.Errorf("source is not a directory")
+ return errors.New("source is not a directory")
}
_, err = os.Stat(dst)