Skip to content

Commit c430991

Browse files
committed
placate lint
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 8d896d0 commit c430991

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

cmd/dump.go

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -49,38 +49,6 @@ func addFile(w archiver.Writer, filePath string, absPath string, verbose bool) e
4949
})
5050
}
5151

52-
func addRecursive(w archiver.Writer, dirPath string, absPath string, verbose bool) error {
53-
if verbose {
54-
log.Info("Adding dir %s\n", dirPath)
55-
}
56-
dir, err := os.Open(absPath)
57-
if err != nil {
58-
return fmt.Errorf("Could not open directory %s: %s", absPath, err)
59-
}
60-
defer dir.Close()
61-
62-
files, err := dir.Readdir(0)
63-
if err != nil {
64-
return fmt.Errorf("Unable to list files in %s: %s", absPath, err)
65-
}
66-
67-
if err := addFile(w, dirPath, absPath, false); err != nil {
68-
return err
69-
}
70-
71-
for _, fileInfo := range files {
72-
if fileInfo.IsDir() {
73-
err = addRecursive(w, filepath.Join(dirPath, fileInfo.Name()), filepath.Join(absPath, fileInfo.Name()), verbose)
74-
} else {
75-
err = addFile(w, filepath.Join(dirPath, fileInfo.Name()), filepath.Join(absPath, fileInfo.Name()), verbose)
76-
}
77-
if err != nil {
78-
return err
79-
}
80-
}
81-
return nil
82-
}
83-
8452
func isSubdir(upper string, lower string) (bool, error) {
8553
if relPath, err := filepath.Rel(upper, lower); err != nil {
8654
return false, err

0 commit comments

Comments
 (0)