1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

Appease linter

This commit is contained in:
Jesse Duffield
2023-08-02 08:21:55 +10:00
parent df0c3b3ea8
commit c92ed07082
6 changed files with 21 additions and 20 deletions

View File

@ -3,7 +3,6 @@ package oscommands
import (
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
)
@ -106,7 +105,7 @@ func CopyDir(src string, dst string) (err error) {
return //nolint: nakedret
}
entries, err := ioutil.ReadDir(src)
entries, err := os.ReadDir(src)
if err != nil {
return //nolint: nakedret
}
@ -121,8 +120,14 @@ func CopyDir(src string, dst string) (err error) {
return //nolint: nakedret
}
} else {
var info os.FileInfo
info, err = entry.Info()
if err != nil {
return //nolint: nakedret
}
// Skip symlinks.
if entry.Mode()&os.ModeSymlink != 0 {
if info.Mode()&os.ModeSymlink != 0 {
continue
}