diff options
| author | Paul Buetow <paul@buetow.org> | 2024-10-02 10:46:00 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-10-02 10:46:00 +0300 |
| commit | a93d91223724b94480b7166970ede97d8d190bdb (patch) | |
| tree | 14e3552c5713d4a7b3d2602d8567ab11785c2906 /internal/oi | |
| parent | bc6a3e478a7e0efc12c30be9f74ef5c3ff7a63fb (diff) | |
refactor
Diffstat (limited to 'internal/oi')
| -rw-r--r-- | internal/oi/oi.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/oi/oi.go b/internal/oi/oi.go index c6b569f..967109d 100644 --- a/internal/oi/oi.go +++ b/internal/oi/oi.go @@ -59,7 +59,6 @@ func TraverseDir(dir string, cb func(file os.DirEntry) error) error { } var errs []error - for _, file := range files { if err := cb(file); err != nil { errs = append(errs, err) @@ -85,6 +84,7 @@ func ReadDirSlurp[T any](dir string, cb func(file os.DirEntry) (T, bool)) ([]T, return results, nil } +// Rename to ReadDirRandom func ReadDirRandomEntry[T any](dir string, cb func(file os.DirEntry) (T, bool)) (T, error) { results, err := ReadDirSlurp(dir, cb) |
