More linter fixes

This commit is contained in:
Kovid Goyal
2023-09-23 10:19:46 +05:30
parent 38bac98c12
commit 627c80125b
7 changed files with 55 additions and 39 deletions

View File

@@ -76,13 +76,15 @@ func get_ssh_file(hostname, rpath string) (string, error) {
}
ans := filepath.Join(tdir, rpath)
if count == 1 {
filepath.WalkDir(tdir, func(path string, d fs.DirEntry, err error) error {
if err = filepath.WalkDir(tdir, func(path string, d fs.DirEntry, err error) error {
if !d.IsDir() {
ans = path
return fs.SkipAll
}
return nil
})
}); err != nil {
return "", err
}
}
return ans, nil
}