diff options
| author | Jeff Carr <[email protected]> | 2025-10-11 14:13:23 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-11 15:17:29 -0500 |
| commit | 75c9e564d93f2c482434502bc2eea7bd39a32fb0 (patch) | |
| tree | e208aeef351bf2e058fb266e2830fe2d7cf9164c /find.go | |
| parent | e176d4cf7fd6693d5cdcdf9e7fc337f9e84f6249 (diff) | |
works maybe
Diffstat (limited to 'find.go')
| -rw-r--r-- | find.go | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ +package main + +import ( + "os" + "path/filepath" +) + +func FindFiles(lookhere string) ([]string, error) { + var allfiles []string + + err := filepath.Walk(lookhere, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + + if !info.IsDir() { + allfiles = append(allfiles, path) + } + return nil + }) + + return allfiles, err +} |
